org.jboss.remoting3.spi
Interface ConnectionProvider
- All Superinterfaces:
- Closeable, HandleableCloseable<ConnectionProvider>
public interface ConnectionProvider
- extends HandleableCloseable<ConnectionProvider>
A connection provider. Used to establish connections with remote systems. There is typically one instance
of this interface per connection provider factory per endpoint.
NO_PROVIDER_INTERFACES
static final Object NO_PROVIDER_INTERFACES
- The object to use when a connection provider has no provider interfaces.
connect
org.xnio.Cancellable connect(SocketAddress bindAddress,
SocketAddress destination,
org.xnio.OptionMap connectOptions,
org.xnio.Result<ConnectionHandlerFactory> result,
CallbackHandler callbackHandler,
org.xnio.ssl.XnioSsl xnioSsl)
throws IllegalArgumentException
- Open an outbound connection, using the (optionally) given socket addresses as source and destination.
This method is expected to be non-blocking, with the result stored in the result variable possibly asynchronously.
- Parameters:
bindAddress
- 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 use
- Returns:
- a handle which may be used to cancel the connect attempt
- Throws:
IllegalArgumentException
- if any of the given arguments are not valid for this protocol
getProviderInterface
Object getProviderInterface()
- Get the user data associated with this connection provider. This object should implement all of the
provider interfaces which are supported by this provider. Must not return
null
.
- Returns:
- the user data (not
null
) - See Also:
NetworkServerProvider
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.