JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3.spi
Interface ConnectionProvider


public interface 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.

This interface is part of the Remoting 3 public API, and is intended to be implemented by users of this API. Abstract members will generally not be added to such types so as to avoid backwards compatibility problems.


Method Summary
 org.jboss.xnio.Cancellable connect(URI uri, org.jboss.xnio.OptionMap connectOptions, org.jboss.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.
 

Method Detail

connect

org.jboss.xnio.Cancellable connect(URI uri,
                                   org.jboss.xnio.OptionMap connectOptions,
                                   org.jboss.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.

Returns:
the user data

JBoss Remoting 3.1.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.