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
-
addressOf
Returns the socket address of a givenserver.- Parameters:
server- the server- Returns:
- the server socket address
-
protocolOf
-
resolve
-
endpoint
-
isValid
Check the state validity.- Parameters:
state- resolver state- Returns:
- the state validity
-
refresh
-
dispose
-
close
void close()Close this resolver.
-