public interface Endpoint extends HandleableCloseable<Endpoint>, Attachable
| Modifier and Type | Interface and Description |
|---|---|
static class |
Endpoint.ListenerFlag
Flags which can be passed in to listener registration methods.
|
HandleableCloseable.Key| Modifier and Type | Method and Description |
|---|---|
Registration |
addConnectionProvider(String uriScheme,
ConnectionProviderFactory providerFactory,
OptionMap optionMap)
Register a connection provider for a URI scheme.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
CallbackHandler callbackHandler)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
CallbackHandler callbackHandler,
SSLContext sslContext)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
CallbackHandler callbackHandler,
XnioSsl xnioSsl)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password,
SSLContext sslContext)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(String protocol,
SocketAddress bindAddress,
SocketAddress destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password,
XnioSsl xnioSsl)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
CallbackHandler callbackHandler)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
CallbackHandler callbackHandler,
SSLContext sslContext)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
CallbackHandler callbackHandler,
XnioSsl xnioSsl)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password,
SSLContext sslContext)
Open a connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
String userName,
String realmName,
char[] password,
XnioSsl xnioSsl)
Open a connection with a peer.
|
<T> T |
getConnectionProviderInterface(String uriScheme,
Class<T> expectedType)
Get the interface for a connection provider.
|
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, closeAsyncgetAttachmentsString 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 registeredIoFuture<Connection> connect(URI destination) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, 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 attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler, SSLContext sslContext) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationsslContext - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler, XnioSsl xnioSsl) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationxnioSsl - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, String userName, String realmName, char[] password) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, String userName, String realmName, char[] password, SSLContext sslContext) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedsslContext - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(URI destination, OptionMap connectOptions, String userName, String realmName, char[] password, XnioSsl xnioSsl) throws IOException
connect EndpointPermission to invoke this method.destination - the destinationconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedxnioSsl - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectionIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, CallbackHandler callbackHandler, SSLContext sslContext) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationsslContext - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, CallbackHandler callbackHandler, XnioSsl xnioSsl) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationxnioSsl - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, String userName, String realmName, char[] password) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, String userName, String realmName, char[] password, SSLContext sslContext) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedsslContext - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptIoFuture<Connection> connect(String protocol, SocketAddress bindAddress, SocketAddress destination, OptionMap connectOptions, String userName, String realmName, char[] password, XnioSsl xnioSsl) throws IOException
connect EndpointPermission to invoke this method.protocol - the protocol to use for connectionbindAddress - the address to bind to, or null to choose one automatically as neededdestination - the destination address, or null if the protocol is not a network protocolconnectOptions - options to configure this connectionuserName - the user name to authenticate as, or null if it is unspecifiedrealmName - the user realm to authenticate with, or null if it is unspecifiedpassword - the password to send, or null if it is unspecifiedxnioSsl - the SSL context to use for SSL connectionsIOException - if an error occurs while starting the connect attemptRegistration 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()
Copyright © 2018 JBoss by Red Hat. All rights reserved.