@Deprecated public class LegacyEndpoint extends Object implements Endpoint
HandleableCloseable.Key
ENDPOINT_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, wait
builder, connect, getConnectedIdentity, getConnectedIdentity, getConnectedIdentityIfExists, getConnection, getConnection, getConnection, getConnection, getConnectionIfExists, getConnectionIfExists, getConnectionIfExists, getCurrent, getInstanceContextManager
run, runAction, runBiConsumer, runBiFunction, runBiPredicate, runCallable, runConsumer, runExBiConsumer, runExBiFunction, runExBiPredicate, runExceptionAction, runExConsumer, runExFunction, runExIntFunction, runExLongFunction, runExPredicate, runFunction, runIntFunction, runLongFunction, runPredicate
public LegacyEndpoint(Endpoint endpoint)
public void close() throws IOException
HandleableCloseable
close
in interface Closeable
close
in interface AutoCloseable
close
in interface HandleableCloseable<Endpoint>
IOException
- if the close failedpublic void awaitClosed() throws InterruptedException
HandleableCloseable
awaitClosed
in interface HandleableCloseable<Endpoint>
InterruptedException
- if the operation is interruptedpublic void awaitClosedUninterruptibly()
HandleableCloseable
awaitClosedUninterruptibly
in interface HandleableCloseable<Endpoint>
public void closeAsync()
HandleableCloseable
closeAsync
in interface HandleableCloseable<Endpoint>
public HandleableCloseable.Key addCloseHandler(CloseHandler<? super Endpoint> handler)
HandleableCloseable
addCloseHandler
in interface HandleableCloseable<Endpoint>
handler
- the close handlerpublic boolean isOpen()
HandleableCloseable
true
.isOpen
in interface HandleableCloseable<Endpoint>
true
if the resource is still openpublic Attachments getAttachments()
Attachable
getAttachments
in interface Attachable
public String getName()
Endpoint
public Registration registerService(String serviceType, OpenListener openListener, OptionMap optionMap) throws ServiceRegistrationException
Endpoint
registerService
in interface Endpoint
serviceType
- 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)
Endpoint
getConnectedIdentity
in interface Endpoint
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
)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 Endpoint
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 existspublic IoFuture<Connection> connect(URI destination, OptionMap connectOptions)
Endpoint
connect EndpointPermission
to invoke this method.public IoFuture<Connection> connect(URI destination, OptionMap connectOptions, AuthenticationContext authenticationContext)
Endpoint
connect EndpointPermission
to invoke this method.public IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, AuthenticationContext authenticationContext)
Endpoint
connect EndpointPermission
to invoke this method.public IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration)
Endpoint
connect EndpointPermission
to invoke this method.connect
in interface Endpoint
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
)public IoFuture<Connection> connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException
Endpoint
connect EndpointPermission
to invoke this method.connect
in interface Endpoint
destination
- the destinationconnectOptions
- options to configure this connectioncallbackHandler
- the local callback handler to use for authenticationnull
)IOException
public Registration addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, OptionMap optionMap) throws DuplicateRegistrationException, IOException
Endpoint
addConnectionProvider EndpointPermission
to invoke this method.addConnectionProvider
in interface Endpoint
uriScheme
- 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
Endpoint
getConnectionProviderInterface EndpointPermission
to invoke this method.getConnectionProviderInterface
in interface Endpoint
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 typepublic boolean isValidUriScheme(String uriScheme)
Endpoint
isValidUriScheme
in interface Endpoint
uriScheme
- the URI schemetrue
if the URI scheme is valid at the time this method is calledpublic XnioWorker getXnioWorker()
Endpoint
getXnioWorker
in interface Endpoint
Copyright © 2021 JBoss by Red Hat. All rights reserved.