Package org.jboss.remoting3
Class LegacyEndpoint
- java.lang.Object
-
- org.jboss.remoting3.LegacyEndpoint
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Attachable
,Endpoint
,HandleableCloseable<Endpoint>
,org.wildfly.common.context.Contextual<Endpoint>
@Deprecated public class LegacyEndpoint extends Object implements Endpoint
Deprecated.- Author:
- bmaxwell JBEAP-14783 wraper to imitate Remoting 4.0 behavior Wrap endpoint and ignore addConnectionProvider to avoid DuplicateRegistrationException
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.remoting3.HandleableCloseable
HandleableCloseable.Key
-
-
Field Summary
-
Fields inherited from interface org.jboss.remoting3.Endpoint
ENDPOINT_CONTEXT_MANAGER
-
-
Constructor Summary
Constructors Constructor Description LegacyEndpoint(Endpoint endpoint)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HandleableCloseable.Key
addCloseHandler(CloseHandler<? super Endpoint> handler)
Deprecated.Add a handler that will be called upon close.Registration
addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, org.xnio.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.org.xnio.IoFuture<Connection>
connect(URI destination, InetSocketAddress bindAddress, org.xnio.OptionMap connectOptions, SSLContext sslContext, org.wildfly.security.auth.client.AuthenticationConfiguration connectionConfiguration)
Deprecated.Open an unshared connection with a peer.org.xnio.IoFuture<Connection>
connect(URI destination, InetSocketAddress bindAddress, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Deprecated.Open an unshared connection with a peer.org.xnio.IoFuture<Connection>
connect(URI destination, org.xnio.OptionMap connectOptions)
Deprecated.Open an unshared connection with a peer.org.xnio.IoFuture<Connection>
connect(URI destination, org.xnio.OptionMap connectOptions, CallbackHandler callbackHandler)
Deprecated.Open an unshared connection with a peer.org.xnio.IoFuture<Connection>
connect(URI destination, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Deprecated.Open an unshared connection with a peer.Attachments
getAttachments()
Deprecated.Get the attachments for this entity.org.xnio.IoFuture<ConnectionPeerIdentity>
getConnectedIdentity(URI destination, SSLContext sslContext, org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
Deprecated.Get a possibly shared, possibly existing connection to the destination.org.xnio.IoFuture<ConnectionPeerIdentity>
getConnectedIdentityIfExists(URI destination, SSLContext sslContext, org.wildfly.security.auth.client.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.org.xnio.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, org.xnio.OptionMap optionMap)
Deprecated.Register a new service.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.common.context.Contextual
run, runAction, runBiConsumer, runBiFunction, runBiPredicate, runCallable, runConsumer, runExBiConsumer, runExBiFunction, runExBiPredicate, runExceptionAction, runExConsumer, runExFunction, runExIntFunction, runExLongFunction, runExPredicate, runFunction, runIntFunction, runLongFunction, runPredicate
-
Methods inherited from interface org.jboss.remoting3.Endpoint
connect, getConnectedIdentity, getConnectedIdentity, getConnectedIdentityIfExists, getConnection, getConnection, getConnection, getConnection, getConnectionIfExists, getConnectionIfExists, getConnectionIfExists, getInstanceContextManager
-
-
-
-
Constructor Detail
-
LegacyEndpoint
public LegacyEndpoint(Endpoint endpoint)
Deprecated.
-
-
Method Detail
-
close
public void close() throws IOException
Deprecated.Description copied from interface:HandleableCloseable
Close this resource. Call any registered close handlers. Calling this method more than once will not have any additional effect.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceHandleableCloseable<Endpoint>
- Throws:
IOException
- if the close failed
-
awaitClosed
public void awaitClosed() throws InterruptedException
Deprecated.Description copied from interface:HandleableCloseable
Wait for a resource close to complete.- Specified by:
awaitClosed
in interfaceHandleableCloseable<Endpoint>
- Throws:
InterruptedException
- if the operation is interrupted
-
awaitClosedUninterruptibly
public void awaitClosedUninterruptibly()
Deprecated.Description copied from interface:HandleableCloseable
Wait for a resource close to complete.- Specified by:
awaitClosedUninterruptibly
in interfaceHandleableCloseable<Endpoint>
-
closeAsync
public void closeAsync()
Deprecated.Description copied from interface:HandleableCloseable
Asynchronously close this resource. Returns immediately.- Specified by:
closeAsync
in interfaceHandleableCloseable<Endpoint>
-
addCloseHandler
public HandleableCloseable.Key addCloseHandler(CloseHandler<? super Endpoint> handler)
Deprecated.Description copied from interface:HandleableCloseable
Add a handler that will be called upon close. If the resource is already closed, the handler will be called immediately.- Specified by:
addCloseHandler
in interfaceHandleableCloseable<Endpoint>
- Parameters:
handler
- the close handler- Returns:
- a key which may be used to later remove this handler
-
isOpen
public boolean isOpen()
Deprecated.Description copied from interface:HandleableCloseable
Read the status of this resource. This is just a snapshot in time; there is no guarantee that the resource will remain open for any amount of time, even if this method returnstrue
.- Specified by:
isOpen
in interfaceHandleableCloseable<Endpoint>
- Returns:
true
if the resource is still open
-
getAttachments
public Attachments getAttachments()
Deprecated.Description copied from interface:Attachable
Get the attachments for this entity.- Specified by:
getAttachments
in interfaceAttachable
- Returns:
- the attachments
-
getName
public String getName()
Deprecated.Description copied from interface:Endpoint
Get the name of this endpoint.
-
registerService
public Registration registerService(String serviceType, OpenListener openListener, org.xnio.OptionMap optionMap) throws ServiceRegistrationException
Deprecated.Description copied from interface:Endpoint
Register a new service.- Specified by:
registerService
in interfaceEndpoint
- Parameters:
serviceType
- the service typeopenListener
- the channel open listeneroptionMap
- the option map- Returns:
- the service registration which may be closed to remove the service
- Throws:
ServiceRegistrationException
- if the service could not be registered
-
getConnectedIdentity
public org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentity(URI destination, SSLContext sslContext, org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
Deprecated.Description copied from interface:Endpoint
Get a possibly shared, possibly existing connection to the destination. The authentication and SSL configuration is specified directly.- Specified by:
getConnectedIdentity
in interfaceEndpoint
- Parameters:
destination
- the destination URI (must not benull
)sslContext
- the SSL context to use for secure connections (may benull
)authenticationConfiguration
- the authentication configuration to use (must not benull
)- Returns:
- the future connection identity (not
null
)
-
getConnectedIdentityIfExists
public org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists(URI destination, SSLContext sslContext, org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
Deprecated.Description copied from interface:Endpoint
Get a possibly shared, possibly existing connection to the destination, if the connection was already established. The authentication and SSL configuration is specified directly.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.- Specified by:
getConnectedIdentityIfExists
in interfaceEndpoint
- Parameters:
destination
- the destination URI (must not benull
)sslContext
- the SSL context to use for secure connections (may benull
)authenticationConfiguration
- the authentication configuration to use (must not benull
)- Returns:
- the existing connection, or
null
if no connection currently exists
-
connect
public org.xnio.IoFuture<Connection> connect(URI destination, org.xnio.OptionMap connectOptions)
Deprecated.Description copied from interface:Endpoint
Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block. You must have theconnect EndpointPermission
to invoke this method.
-
connect
public org.xnio.IoFuture<Connection> connect(URI destination, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Deprecated.Description copied from interface:Endpoint
Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block. You must have theconnect EndpointPermission
to invoke this method.
-
connect
public org.xnio.IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, org.xnio.OptionMap connectOptions, org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
Deprecated.Description copied from interface:Endpoint
Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block. You must have theconnect EndpointPermission
to invoke this method.
-
connect
public org.xnio.IoFuture<Connection> connect(URI destination, InetSocketAddress bindAddress, org.xnio.OptionMap connectOptions, SSLContext sslContext, org.wildfly.security.auth.client.AuthenticationConfiguration connectionConfiguration)
Deprecated.Description copied from interface:Endpoint
Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block. You must have theconnect EndpointPermission
to invoke this method.- Specified by:
connect
in interfaceEndpoint
- Parameters:
destination
- the destinationbindAddress
- the local bind addressconnectOptions
- options to configure this connectionsslContext
- the SSL context to use for secure connections (may benull
)connectionConfiguration
- the connection authentication configuration (must not benull
)- Returns:
- the future connection (not
null
)
-
connect
public org.xnio.IoFuture<Connection> connect(URI destination, org.xnio.OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException
Deprecated.Description copied from interface:Endpoint
Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block. You must have theconnect EndpointPermission
to invoke this method.- Specified by:
connect
in interfaceEndpoint
- Parameters:
destination
- the destinationconnectOptions
- options to configure this connectioncallbackHandler
- the local callback handler to use for authentication- Returns:
- the future connection (not
null
) - Throws:
IOException
-
addConnectionProvider
public Registration addConnectionProvider(String uriScheme, ConnectionProviderFactory providerFactory, org.xnio.OptionMap optionMap) throws DuplicateRegistrationException, IOException
Deprecated.Description copied from interface:Endpoint
Register a connection provider for a URI scheme. The provider factory is called with the context which can be used to accept new connections or terminate the registration. You must have theaddConnectionProvider EndpointPermission
to invoke this method.- Specified by:
addConnectionProvider
in interfaceEndpoint
- Parameters:
uriScheme
- the URI schemeproviderFactory
- the provider factoryoptionMap
- the configuration options for the connection provider- Returns:
- a handle which may be used to remove the registration
- Throws:
DuplicateRegistrationException
- if there is already a provider registered to that URI schemeIOException
- if the provider failed to initialize
-
getConnectionProviderInterface
public <T> T getConnectionProviderInterface(String uriScheme, Class<T> expectedType) throws UnknownURISchemeException, ClassCastException
Deprecated.Description copied from interface:Endpoint
Get the interface for a connection provider. You must have thegetConnectionProviderInterface EndpointPermission
to invoke this method.- Specified by:
getConnectionProviderInterface
in interfaceEndpoint
- Type Parameters:
T
- the expected type of the interface- Parameters:
uriScheme
- the URI scheme of the registered connection providerexpectedType
- the expected type of the interface- Returns:
- the provider interface
- Throws:
UnknownURISchemeException
- if the given URI scheme is not registeredClassCastException
- if the interface type does not match the expected type
-
isValidUriScheme
public boolean isValidUriScheme(String uriScheme)
Deprecated.Description copied from interface:Endpoint
Determine whether the given URI scheme is valid for this endpoint.- Specified by:
isValidUriScheme
in interfaceEndpoint
- Parameters:
uriScheme
- the URI scheme- Returns:
true
if the URI scheme is valid at the time this method is called
-
getXnioWorker
public org.xnio.XnioWorker getXnioWorker()
Deprecated.Description copied from interface:Endpoint
Get the XNIO worker configured for this endpoint.- Specified by:
getXnioWorker
in interfaceEndpoint
- Returns:
- the XNIO worker
-
-