public interface Endpoint extends HandleableCloseable<Endpoint>, Attachable, org.wildfly.common.context.Contextual<Endpoint>
HandleableCloseable.Key
Modifier and Type | Field and Description |
---|---|
static org.wildfly.common.context.ContextManager<Endpoint> |
ENDPOINT_CONTEXT_MANAGER
The context manager for Remoting endpoints.
|
Modifier and Type | Method and Description |
---|---|
Registration |
addConnectionProvider(String uriScheme,
ConnectionProviderFactory providerFactory,
org.xnio.OptionMap optionMap)
Register a connection provider for a URI scheme.
|
static EndpointBuilder |
builder()
Create a new endpoint builder.
|
default org.xnio.IoFuture<Connection> |
connect(URI destination)
Open a connection with a peer.
|
org.xnio.IoFuture<Connection> |
connect(URI destination,
InetSocketAddress bindAddress,
org.xnio.OptionMap connectOptions,
org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Open a connection with a peer.
|
org.xnio.IoFuture<Connection> |
connect(URI destination,
org.xnio.OptionMap connectOptions)
Open a connection with a peer.
|
org.xnio.IoFuture<Connection> |
connect(URI destination,
org.xnio.OptionMap connectOptions,
org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Open a connection with a peer.
|
default org.xnio.IoFuture<Connection> |
getConnection(URI destination)
Get a possibly pre-existing connection to the destination.
|
org.xnio.IoFuture<Connection> |
getConnection(URI destination,
String abstractType,
String abstractTypeAuthority)
Get a possibly pre-existing connection to the destination.
|
<T> T |
getConnectionProviderInterface(String uriScheme,
Class<T> expectedType)
Get the interface for a connection provider.
|
static Endpoint |
getCurrent()
Get the currently active Remoting endpoint.
|
default org.wildfly.common.context.ContextManager<Endpoint> |
getInstanceContextManager()
Get the context manager for Remoting endpoints (
ENDPOINT_CONTEXT_MANAGER ). |
String |
getName()
Get the name of this endpoint.
|
org.xnio.XnioWorker |
getXnioWorker()
Get the XNIO worker configured for this endpoint.
|
boolean |
isValidUriScheme(String uriScheme)
Determine whether the given URI scheme is valid for this endpoint.
|
Registration |
registerService(String serviceType,
OpenListener openListener,
org.xnio.OptionMap optionMap)
Register a new service.
|
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsync
getAttachments
run, runAction, runBiConsumer, runBiFunction, runBiPredicate, runCallable, runConsumer, runExBiConsumer, runExBiFunction, runExBiPredicate, runExceptionAction, runExConsumer, runExFunction, runExIntFunction, runExLongFunction, runExPredicate, runFunction, runIntFunction, runLongFunction, runPredicate
static final org.wildfly.common.context.ContextManager<Endpoint> ENDPOINT_CONTEXT_MANAGER
default org.wildfly.common.context.ContextManager<Endpoint> getInstanceContextManager()
ENDPOINT_CONTEXT_MANAGER
).getInstanceContextManager
in interface org.wildfly.common.context.Contextual<Endpoint>
null
)static Endpoint getCurrent()
null
is returned.null
if noneString getName()
null
if there is no nameRegistration registerService(String serviceType, OpenListener openListener, org.xnio.OptionMap optionMap) throws ServiceRegistrationException
serviceType
- the service typeopenListener
- the channel open listeneroptionMap
- the option mapServiceRegistrationException
- if the service could not be registereddefault org.xnio.IoFuture<Connection> getConnection(URI destination)
destination
- the destination URIorg.xnio.IoFuture<Connection> getConnection(URI destination, String abstractType, String abstractTypeAuthority)
destination
- the destination URIabstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)default org.xnio.IoFuture<Connection> connect(URI destination) throws IOException
connect EndpointPermission
to invoke this method.destination
- the destinationIOException
- if an error occurs while starting the connect attemptorg.xnio.IoFuture<Connection> connect(URI destination, org.xnio.OptionMap connectOptions) throws IOException
connect EndpointPermission
to invoke this method.destination
- the destinationconnectOptions
- options to configure this connectionIOException
- if an error occurs while starting the connect attemptorg.xnio.IoFuture<Connection> connect(URI destination, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext) throws IOException
connect EndpointPermission
to invoke this method.destination
- the destinationconnectOptions
- options to configure this connectionauthenticationContext
- the client authentication context to useIOException
- if an error occurs while starting the connect attemptorg.xnio.IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext) throws IOException
connect EndpointPermission
to invoke this method.destination
- the destinationbindAddress
- the local bind addressconnectOptions
- options to configure this connectionauthenticationContext
- the client authentication context to usesaslClientFactory
- the SASL client factory to use for client authenticationIOException
- if an error occurs while starting the connect attemptRegistration addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, org.xnio.OptionMap optionMap) throws DuplicateRegistrationException, IOException
addConnectionProvider EndpointPermission
to invoke this method.uriScheme
- the URI schemeproviderFactory
- the provider factoryoptionMap
- the configuration options for the connection providerIOException
- if the provider failed to initializeDuplicateRegistrationException
- if there is already a provider registered to that URI scheme<T> T getConnectionProviderInterface(String uriScheme, Class<T> expectedType) throws UnknownURISchemeException, ClassCastException
getConnectionProviderInterface EndpointPermission
to invoke this method.T
- the expected type of the interfaceuriScheme
- the URI scheme of the registered connection providerexpectedType
- the expected type of the interfaceUnknownURISchemeException
- if the given URI scheme is not registeredClassCastException
- if the interface type does not match the expected typeboolean isValidUriScheme(String uriScheme)
uriScheme
- the URI schemetrue
if the URI scheme is valid at the time this method is calledorg.xnio.XnioWorker getXnioWorker()
static EndpointBuilder builder()
Copyright © 2016 JBoss, a division of Red Hat, Inc.. All rights reserved.