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,
OptionMap optionMap)
Register a connection provider for a URI scheme.
|
static EndpointBuilder |
builder()
Create a new endpoint builder.
|
default IoFuture<Connection> |
connect(URI destination)
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
InetSocketAddress bindAddress,
OptionMap connectOptions,
AuthenticationContext authenticationContext)
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
InetSocketAddress bindAddress,
OptionMap connectOptions,
SSLContext sslContext,
AuthenticationConfiguration connectionConfiguration)
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions)
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
AuthenticationContext authenticationContext)
Open an unshared connection with a peer.
|
IoFuture<ConnectionPeerIdentity> |
getConnectedIdentity(URI destination,
SSLContext sslContext,
AuthenticationConfiguration authenticationConfiguration)
Get a possibly shared, possibly existing connection to the destination.
|
default IoFuture<ConnectionPeerIdentity> |
getConnectedIdentity(URI destination,
String abstractType,
String abstractTypeAuthority)
Get a possibly shared, possibly existing connection to the destination.
|
default IoFuture<ConnectionPeerIdentity> |
getConnectedIdentity(URI destination,
String abstractType,
String abstractTypeAuthority,
AuthenticationContext context)
Get a possibly shared, possibly existing connection to the destination.
|
IoFuture<ConnectionPeerIdentity> |
getConnectedIdentityIfExists(URI destination,
SSLContext sslContext,
AuthenticationConfiguration authenticationConfiguration)
Get a possibly shared, possibly existing connection to the destination, if the connection was already established.
|
default IoFuture<ConnectionPeerIdentity> |
getConnectedIdentityIfExists(URI destination,
String abstractType,
String abstractTypeAuthority,
AuthenticationContext context)
Get a possibly shared, possibly existing connection to the destination, if the connection was already established.
|
default IoFuture<Connection> |
getConnection(URI destination)
Deprecated.
|
default IoFuture<Connection> |
getConnection(URI destination,
SSLContext sslContext,
AuthenticationConfiguration authenticationConfiguration)
Deprecated.
|
default IoFuture<Connection> |
getConnection(URI destination,
SSLContext sslContext,
AuthenticationConfiguration connectionConfiguration,
AuthenticationConfiguration operateConfiguration)
Deprecated.
|
default IoFuture<Connection> |
getConnection(URI destination,
String abstractType,
String abstractTypeAuthority)
Deprecated.
|
default IoFuture<Connection> |
getConnectionIfExists(URI destination)
Deprecated.
|
default IoFuture<Connection> |
getConnectionIfExists(URI destination,
SSLContext sslContext,
AuthenticationConfiguration connectionConfiguration,
AuthenticationConfiguration operateConfiguration)
Deprecated.
|
default IoFuture<Connection> |
getConnectionIfExists(URI destination,
String abstractType,
String abstractTypeAuthority)
Deprecated.
|
<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.
|
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,
OptionMap optionMap)
Register a new service.
|
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsync, isOpen
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, OptionMap optionMap) throws ServiceRegistrationException
serviceType
- the service typeopenListener
- the channel open listeneroptionMap
- the option mapServiceRegistrationException
- if the service could not be registereddefault IoFuture<ConnectionPeerIdentity> getConnectedIdentity(URI destination, String abstractType, String abstractTypeAuthority, AuthenticationContext context)
destination
- the destination URI (must not be null
)abstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)context
- the authentication context to use (must not be null
)null
)default IoFuture<ConnectionPeerIdentity> getConnectedIdentity(URI destination, String abstractType, String abstractTypeAuthority)
destination
- the destination URI (must not be null
)abstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)null
)IoFuture<ConnectionPeerIdentity> getConnectedIdentity(URI destination, SSLContext sslContext, AuthenticationConfiguration authenticationConfiguration)
destination
- the destination URI (must not be null
)sslContext
- the SSL context to use for secure connections (may be null
)authenticationConfiguration
- the authentication configuration to use (must not be null
)null
)default IoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists(URI destination, String abstractType, String abstractTypeAuthority, AuthenticationContext context)
If no existing connection was found, null
is returned. If a non-null
IoFuture
is
returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.
destination
- the destination URI (must not be null
)abstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)context
- the authentication context to use (must not be null
)null
if no connection currently existsIoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists(URI destination, SSLContext sslContext, AuthenticationConfiguration authenticationConfiguration)
If no existing connection was found, null
is returned. If a non-null
IoFuture
is
returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.
destination
- the destination URI (must not be null
)sslContext
- the SSL context to use for secure connections (may be null
)authenticationConfiguration
- the authentication configuration to use (must not be null
)null
if no connection currently exists@Deprecated default IoFuture<Connection> getConnection(URI destination)
destination
- the destination URI@Deprecated default IoFuture<Connection> getConnection(URI destination, String abstractType, String abstractTypeAuthority)
destination
- the destination URI (must not be null
)abstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)@Deprecated default IoFuture<Connection> getConnection(URI destination, SSLContext sslContext, AuthenticationConfiguration authenticationConfiguration)
The given SSL context factory is used only for TLS-based protocols. It may be null
, but in such cases,
no TLS-based protocols will be available.
destination
- the destination URI (must not be null
)sslContext
- the SSL context to use for secure connections (may be null
)authenticationConfiguration
- the authentication configuration to use (must not be null
)@Deprecated default IoFuture<Connection> getConnection(URI destination, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration, AuthenticationConfiguration operateConfiguration)
destination
- the destination URI (must not be null
)sslContext
- the SSL context to use for secure connections (may be null
)connectionConfiguration
- the connection authentication configuration (must not be null
)operateConfiguration
- the run authentication configuration (must not be null
)@Deprecated default IoFuture<Connection> getConnectionIfExists(URI destination, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration, AuthenticationConfiguration operateConfiguration)
If no existing connection was found, null
is returned. If a non-null
IoFuture
is
returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.
destination
- the destination URI (must not be null
)sslContext
- the SSL context to use for secure connections (may be null
)connectionConfiguration
- the connection authentication configuration (must not be null
)operateConfiguration
- the run authentication configuration (must not be null
)null
if no connection currently exists@Deprecated default IoFuture<Connection> getConnectionIfExists(URI destination, String abstractType, String abstractTypeAuthority)
If no existing connection was found, null
is returned. If a non-null
IoFuture
is
returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.
destination
- the destination URI (must not be null
)abstractType
- the abstract type of the connection (may be null
)abstractTypeAuthority
- the authority name of the abstract type of the connection (may be null
)null
if no connection currently exists@Deprecated default IoFuture<Connection> getConnectionIfExists(URI destination)
If no existing connection was found, null
is returned. If a non-null
IoFuture
is
returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.
destination
- the destination URI (must not be null
)null
if no connection currently existsdefault IoFuture<Connection> connect(URI destination)
connect EndpointPermission
to invoke this method.destination
- the destinationIoFuture<Connection> connect(URI destination, OptionMap connectOptions)
connect EndpointPermission
to invoke this method.destination
- the destinationconnectOptions
- options to configure this connectionIoFuture<Connection> connect(URI destination, OptionMap connectOptions, AuthenticationContext authenticationContext)
connect EndpointPermission
to invoke this method.destination
- the destinationconnectOptions
- options to configure this connectionauthenticationContext
- the client authentication context to useIoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, AuthenticationContext authenticationContext)
connect EndpointPermission
to invoke this method.destination
- the destinationbindAddress
- the local bind addressconnectOptions
- options to configure this connectionauthenticationContext
- the client authentication context to useIoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration)
connect EndpointPermission
to invoke this method.destination
- the destinationbindAddress
- the local bind addressconnectOptions
- options to configure this connectionsslContext
- the SSL context to use for secure connections (may be null
)connectionConfiguration
- the connection authentication configuration (must not be null
)null
)Registration addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, 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 calledXnioWorker getXnioWorker()
static EndpointBuilder builder()
Copyright © 2017 JBoss by Red Hat. All rights reserved.