class RemoteConnectionProvider extends AbstractHandleableCloseable<ConnectionProvider> implements ConnectionProvider
| Modifier and Type | Class and Description |
|---|---|
private class |
RemoteConnectionProvider.AcceptListener |
(package private) class |
RemoteConnectionProvider.ProviderInterface |
HandleableCloseable.Key| Modifier and Type | Field and Description |
|---|---|
private ConnectionProviderContext |
connectionProviderContext |
(package private) static org.xnio.Pool<java.nio.ByteBuffer> |
GLOBAL_POOL |
private java.util.Set<RemoteConnectionHandler> |
handlers |
(package private) static boolean |
LEAK_DEBUGGING |
private javax.management.ObjectName |
objectName |
private java.util.Collection<org.xnio.Cancellable> |
pendingInboundConnections |
private RemoteConnectionProvider.ProviderInterface |
providerInterface |
private javax.management.MBeanServer |
server |
private boolean |
sslEnabled |
(package private) static boolean |
USE_POOLING |
private org.xnio.Xnio |
xnio |
private org.xnio.XnioWorker |
xnioWorker |
NO_PROVIDER_INTERFACES| Constructor and Description |
|---|
RemoteConnectionProvider(org.xnio.OptionMap optionMap,
ConnectionProviderContext connectionProviderContext) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addConnectionHandler(RemoteConnectionHandler connectionHandler) |
protected void |
closeAction()
Called exactly once when the
close() method is invoked; the actual close operation should take place here. |
org.xnio.Cancellable |
connect(java.net.SocketAddress bindAddress,
java.net.SocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.Result<ConnectionHandlerFactory> result,
javax.security.auth.callback.CallbackHandler callbackHandler,
org.xnio.ssl.XnioSsl xnioSsl)
Open an outbound connection, using the (optionally) given socket addresses as source and destination.
|
protected org.xnio.IoFuture<org.xnio.channels.ConnectedStreamChannel> |
createConnection(java.net.SocketAddress bindAddress,
java.net.SocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.ChannelListener<org.xnio.channels.ConnectedStreamChannel> openListener) |
protected org.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel> |
createSslConnection(java.net.SocketAddress bindAddress,
java.net.InetSocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.ssl.XnioSsl xnioSsl,
org.xnio.ChannelListener<org.xnio.channels.ConnectedStreamChannel> openListener) |
private void |
doDumpConnectionState() |
private java.lang.String |
doGetConnectionState() |
private void |
doGetConnectionState(java.lang.StringBuilder b) |
ConnectionProviderContext |
getConnectionProviderContext() |
protected java.util.concurrent.Executor |
getExecutor()
Get the executor to use for handler invocation.
|
java.lang.Object |
getProviderInterface()
Get the user data associated with this connection provider.
|
protected org.xnio.XnioWorker |
getXnioWorker() |
(package private) void |
removeConnectionHandler(RemoteConnectionHandler connectionHandler) |
private static java.io.IOException |
sslConfigFailure(java.security.GeneralSecurityException e) |
java.lang.String |
toString() |
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, checkOpen, close, closeAsync, closeComplete, closeFailed, finalize, isOpenclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsyncstatic final boolean USE_POOLING
static final boolean LEAK_DEBUGGING
static final org.xnio.Pool<java.nio.ByteBuffer> GLOBAL_POOL
private final RemoteConnectionProvider.ProviderInterface providerInterface
private final org.xnio.Xnio xnio
private final org.xnio.XnioWorker xnioWorker
private final ConnectionProviderContext connectionProviderContext
private final boolean sslEnabled
private final java.util.Collection<org.xnio.Cancellable> pendingInboundConnections
private final java.util.Set<RemoteConnectionHandler> handlers
private final javax.management.MBeanServer server
private final javax.management.ObjectName objectName
RemoteConnectionProvider(org.xnio.OptionMap optionMap,
ConnectionProviderContext connectionProviderContext)
throws java.io.IOException
java.io.IOExceptionprivate void doDumpConnectionState()
private void doGetConnectionState(java.lang.StringBuilder b)
private java.lang.String doGetConnectionState()
public org.xnio.Cancellable connect(java.net.SocketAddress bindAddress,
java.net.SocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.Result<ConnectionHandlerFactory> result,
javax.security.auth.callback.CallbackHandler callbackHandler,
org.xnio.ssl.XnioSsl xnioSsl)
throws java.lang.IllegalArgumentException
ConnectionProviderconnect in interface ConnectionProviderbindAddress - the local address to bind to for this outbound connection, or null to choose one automaticallydestination - the destination socket address, or null if none is givenconnectOptions - the options to use for this connectionresult - the result which should receive the connectioncallbackHandler - the callback handler to use for authenticationxnioSsl - the XNIO SSL context to usejava.lang.IllegalArgumentException - if any of the given arguments are not valid for this protocolprotected org.xnio.IoFuture<org.xnio.channels.ConnectedStreamChannel> createConnection(java.net.SocketAddress bindAddress,
java.net.SocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.ChannelListener<org.xnio.channels.ConnectedStreamChannel> openListener)
protected org.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel> createSslConnection(java.net.SocketAddress bindAddress,
java.net.InetSocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.ssl.XnioSsl xnioSsl,
org.xnio.ChannelListener<org.xnio.channels.ConnectedStreamChannel> openListener)
public java.lang.Object getProviderInterface()
ConnectionProvidernull.getProviderInterface in interface ConnectionProvidernull)NetworkServerProviderprotected void closeAction()
AbstractHandleableCloseableclose() method is invoked; the actual close operation should take place here.
This method must call AbstractHandleableCloseable.closeComplete(), directly or indirectly, for the close operation to finish
(it may happen in another thread but it must happen).
This method should not expect the AbstractHandleableCloseable.closeComplete() call to be made from another thread from the same thread pool
that may cause AbstractHandleableCloseable.close(). As close will block, this can result in situations where all threads in the pool are
blocked on AbstractHandleableCloseable.close() method calls, which means the AbstractHandleableCloseable.closeComplete() will never be run.closeAction in class AbstractHandleableCloseable<ConnectionProvider>void addConnectionHandler(RemoteConnectionHandler connectionHandler)
void removeConnectionHandler(RemoteConnectionHandler connectionHandler)
protected java.util.concurrent.Executor getExecutor()
AbstractHandleableCloseablegetExecutor in class AbstractHandleableCloseable<ConnectionProvider>private static java.io.IOException sslConfigFailure(java.security.GeneralSecurityException e)
public java.lang.String toString()
toString in class java.lang.Objectprotected org.xnio.XnioWorker getXnioWorker()
public ConnectionProviderContext getConnectionProviderContext()