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(URI uri,
org.xnio.OptionMap connectOptions,
org.xnio.Result<ConnectionHandlerFactory> result,
CallbackHandler callbackHandler)
throws IllegalArgumentException
- Open an outbound connection to the given URI. This method is expected to be non-blocking, with the result
stored in the result variable possibly asynchronously.
- Parameters:
uri
- the URI to connect toconnectOptions
- the options to use for this connectionresult
- the result which should receive the connectioncallbackHandler
- the callback handler to use for authentication
- Returns:
- a handle which may be used to cancel the connect attempt
- Throws:
IllegalArgumentException
- if the URI is not valid
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 © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.