JBoss Remoting 3 3.2.0.CR6

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.remoting3.HandleableCloseable
HandleableCloseable.Key
 
Field Summary
static Object NO_PROVIDER_INTERFACES
          The object to use when a connection provider has no provider interfaces.
 
Method Summary
 org.xnio.Cancellable connect(SocketAddress bindAddress, SocketAddress destination, org.xnio.OptionMap connectOptions, org.xnio.Result<ConnectionHandlerFactory> result, CallbackHandler callbackHandler, org.xnio.ssl.XnioSsl xnioSsl)
          Open an outbound connection, using the (optionally) given socket addresses as source and destination.
 Object getProviderInterface()
          Get the user data associated with this connection provider.
 
Methods inherited from interface org.jboss.remoting3.HandleableCloseable
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsync
 

Field Detail

NO_PROVIDER_INTERFACES

static final Object NO_PROVIDER_INTERFACES
The object to use when a connection provider has no provider interfaces.

Method Detail

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 automatically
destination - the destination socket address, or null if none is given
connectOptions - the options to use for this connection
result - the result which should receive the connection
callbackHandler - the callback handler to use for authentication
xnioSsl - 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

JBoss Remoting 3 3.2.0.CR6

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.