JBoss Remoting 3 3.2.0.Beta2-redhat-1

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(URI uri, org.xnio.OptionMap connectOptions, org.xnio.Result<ConnectionHandlerFactory> result, CallbackHandler callbackHandler)
          Open an outbound connection to the given URI.
 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(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 to
connectOptions - the options to use for this connection
result - the result which should receive the connection
callbackHandler - 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

JBoss Remoting 3 3.2.0.Beta2-redhat-1

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