@Deprecated public class LegacyEndpoint extends Object implements Endpoint
HandleableCloseable.KeyENDPOINT_CONTEXT_MANAGER| Constructor and Description |
|---|
LegacyEndpoint(Endpoint endpoint)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
HandleableCloseable.Key |
addCloseHandler(CloseHandler<? super Endpoint> handler)
Deprecated.
Add a handler that will be called upon close.
|
Registration |
addConnectionProvider(String uriScheme,
ConnectionProviderFactory providerFactory,
OptionMap optionMap)
Deprecated.
Register a connection provider for a URI scheme.
|
void |
awaitClosed()
Deprecated.
Wait for a resource close to complete.
|
void |
awaitClosedUninterruptibly()
Deprecated.
Wait for a resource close to complete.
|
void |
close()
Deprecated.
Close this resource.
|
void |
closeAsync()
Deprecated.
Asynchronously close this resource.
|
IoFuture<Connection> |
connect(URI destination,
InetSocketAddress bindAddress,
OptionMap connectOptions,
AuthenticationContext authenticationContext)
Deprecated.
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
InetSocketAddress bindAddress,
OptionMap connectOptions,
SSLContext sslContext,
AuthenticationConfiguration connectionConfiguration)
Deprecated.
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions)
Deprecated.
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
AuthenticationContext authenticationContext)
Deprecated.
Open an unshared connection with a peer.
|
IoFuture<Connection> |
connect(URI destination,
OptionMap connectOptions,
CallbackHandler callbackHandler)
Deprecated.
Open an unshared connection with a peer.
|
Attachments |
getAttachments()
Deprecated.
Get the attachments for this entity.
|
IoFuture<ConnectionPeerIdentity> |
getConnectedIdentity(URI destination,
SSLContext sslContext,
AuthenticationConfiguration authenticationConfiguration)
Deprecated.
Get a possibly shared, possibly existing connection to the destination.
|
IoFuture<ConnectionPeerIdentity> |
getConnectedIdentityIfExists(URI destination,
SSLContext sslContext,
AuthenticationConfiguration authenticationConfiguration)
Deprecated.
Get a possibly shared, possibly existing connection to the destination, if the connection was already established.
|
<T> T |
getConnectionProviderInterface(String uriScheme,
Class<T> expectedType)
Deprecated.
Get the interface for a connection provider.
|
String |
getName()
Deprecated.
Get the name of this endpoint.
|
XnioWorker |
getXnioWorker()
Deprecated.
Get the XNIO worker configured for this endpoint.
|
boolean |
isOpen()
Deprecated.
Read the status of this resource.
|
boolean |
isValidUriScheme(String uriScheme)
Deprecated.
Determine whether the given URI scheme is valid for this endpoint.
|
Registration |
registerService(String serviceType,
OpenListener openListener,
OptionMap optionMap)
Deprecated.
Register a new service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, connect, getConnectedIdentity, getConnectedIdentity, getConnectedIdentityIfExists, getConnection, getConnection, getConnection, getConnection, getConnectionIfExists, getConnectionIfExists, getConnectionIfExists, getCurrent, getInstanceContextManagerrun, runAction, runBiConsumer, runBiFunction, runBiPredicate, runCallable, runConsumer, runExBiConsumer, runExBiFunction, runExBiPredicate, runExceptionAction, runExConsumer, runExFunction, runExIntFunction, runExLongFunction, runExPredicate, runFunction, runIntFunction, runLongFunction, runPredicatepublic LegacyEndpoint(Endpoint endpoint)
public void close()
throws IOException
HandleableCloseableclose in interface Closeableclose in interface AutoCloseableclose in interface HandleableCloseable<Endpoint>IOException - if the close failedpublic void awaitClosed()
throws InterruptedException
HandleableCloseableawaitClosed in interface HandleableCloseable<Endpoint>InterruptedException - if the operation is interruptedpublic void awaitClosedUninterruptibly()
HandleableCloseableawaitClosedUninterruptibly in interface HandleableCloseable<Endpoint>public void closeAsync()
HandleableCloseablecloseAsync in interface HandleableCloseable<Endpoint>public HandleableCloseable.Key addCloseHandler(CloseHandler<? super Endpoint> handler)
HandleableCloseableaddCloseHandler in interface HandleableCloseable<Endpoint>handler - the close handlerpublic boolean isOpen()
HandleableCloseabletrue.isOpen in interface HandleableCloseable<Endpoint>true if the resource is still openpublic Attachments getAttachments()
AttachablegetAttachments in interface Attachablepublic String getName()
Endpointpublic Registration registerService(String serviceType, OpenListener openListener, OptionMap optionMap) throws ServiceRegistrationException
EndpointregisterService in interface EndpointserviceType - the service typeopenListener - the channel open listeneroptionMap - the option mapServiceRegistrationException - if the service could not be registeredpublic IoFuture<ConnectionPeerIdentity> getConnectedIdentity(URI destination, SSLContext sslContext, AuthenticationConfiguration authenticationConfiguration)
EndpointgetConnectedIdentity in interface Endpointdestination - 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)public IoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists(URI destination, SSLContext sslContext, AuthenticationConfiguration authenticationConfiguration)
Endpoint
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.
getConnectedIdentityIfExists in interface Endpointdestination - 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 existspublic IoFuture<Connection> connect(URI destination, OptionMap connectOptions)
Endpointconnect EndpointPermission to invoke this method.public IoFuture<Connection> connect(URI destination, OptionMap connectOptions, AuthenticationContext authenticationContext)
Endpointconnect EndpointPermission to invoke this method.public IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, AuthenticationContext authenticationContext)
Endpointconnect EndpointPermission to invoke this method.public IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration)
Endpointconnect EndpointPermission to invoke this method.connect in interface Endpointdestination - 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)public IoFuture<Connection> connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException
Endpointconnect EndpointPermission to invoke this method.connect in interface Endpointdestination - the destinationconnectOptions - options to configure this connectioncallbackHandler - the local callback handler to use for authenticationnull)IOExceptionpublic Registration addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, OptionMap optionMap) throws DuplicateRegistrationException, IOException
EndpointaddConnectionProvider EndpointPermission to invoke this method.addConnectionProvider in interface EndpointuriScheme - the URI schemeproviderFactory - the provider factoryoptionMap - the configuration options for the connection providerDuplicateRegistrationException - if there is already a provider registered to that URI schemeIOException - if the provider failed to initializepublic <T> T getConnectionProviderInterface(String uriScheme, Class<T> expectedType) throws UnknownURISchemeException, ClassCastException
EndpointgetConnectionProviderInterface EndpointPermission to invoke this method.getConnectionProviderInterface in interface EndpointT - 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 typepublic boolean isValidUriScheme(String uriScheme)
EndpointisValidUriScheme in interface EndpointuriScheme - the URI schemetrue if the URI scheme is valid at the time this method is calledpublic XnioWorker getXnioWorker()
EndpointgetXnioWorker in interface EndpointCopyright © 2019 JBoss by Red Hat. All rights reserved.