Module io.vertx.core
Package io.vertx.core.spi.endpoint
Interface EndpointResolver<A extends Address,S,D,E>
- Type Parameters:
A- the type ofAddressresolvedS- the type of the endpoint serverD- the type of the data managed by the resolverE- the type of the endpoint
public interface EndpointResolver<A extends Address,S,D,E>
Endpoint resolver Service Provider Interface (SPI).
} resolves an address to resolver managed state invalid @link
{@link #resolve)
<S>. State modifying methods can be called
concurrently, the implementation is responsible to manage concurrent state modifications.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the socket address of a givenserver.voidclose()Close this resolver.voidDispose the state.Return the current endpoint visible by the resolver.booleanCheck the state validity.default StringprotocolOf(S server) Returns the protocol id of a given server.resolve(A address, EndpointBuilder<E, S> builder) Resolve an address to the resolver state for this name.Try to cast theaddressto an address instance that can be resolved by this resolver instance.
-
Method Details
-
tryCast
Try to cast theaddressto an address instance that can be resolved by this resolver instance.- Parameters:
address- the address to cast- Returns:
- the address or
nullwhen theaddresscannot be resolved by this resolver
-
addressOf
Returns the socket address of a givenserver.- Parameters:
server- the server- Returns:
- the server socket address
-
protocolOf
Returns the protocol id of a given server.- Parameters:
server- the server- Returns:
- the protocol if of the server or
nullif unknown
-
resolve
Resolve an address to the resolver state for this name.- Parameters:
address- the address to resolvebuilder- the endpoint builder- Returns:
- a future notified with the result
-
endpoint
Return the current endpoint visible by the resolver.- Parameters:
state- the resolver state- Returns:
- the list of endpoints
-
isValid
Check the state validity.- Parameters:
state- resolver state- Returns:
- the state validity
-
refresh
- Parameters:
address-state-- Returns:
-
dispose
Dispose the state.- Parameters:
data- the state
-
close
void close()Close this resolver.
-