JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3
Interface Connection

All Superinterfaces:
Attachable, Closeable, HandleableCloseable<Connection>

public interface Connection
extends HandleableCloseable<Connection>, Attachable

A connection to a remote peer.

This interface is part of the Remoting 3 public API. While instances of this type may be used publicly, users are not encouraged to implement or extend this type as members may be added without notice.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.remoting3.HandleableCloseable
HandleableCloseable.Key
 
Method Summary
<I,O> ClientConnector<I,O>
createClientConnector(RequestListener<I,O> listener, Class<I> requestClass, Class<O> replyClass)
          Create a client connector which may only transmitted to the remote side of this connection, allowing it to use the included service.
<I,O> ClientConnector<I,O>
createClientConnector(RequestListener<I,O> listener, Class<I> requestClass, Class<O> replyClass, org.jboss.xnio.OptionMap optionMap)
          Create a client connector which may only transmitted to the remote side of this connection, allowing it to use the included service.
<I,O> org.jboss.xnio.IoFuture<? extends Client<I,O>>
openClient(String serviceType, String groupName, Class<I> requestClass, Class<O> replyClass)
          Locate and open a client on the remote side of this connection.
<I,O> org.jboss.xnio.IoFuture<? extends Client<I,O>>
openClient(String serviceType, String groupName, Class<I> requestClass, Class<O> replyClass, org.jboss.xnio.OptionMap optionMap)
          Locate and open a client on the remote side of this connection.
 
Methods inherited from interface org.jboss.remoting3.HandleableCloseable
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close
 
Methods inherited from interface org.jboss.remoting3.Attachable
getAttachments
 

Method Detail

openClient

<I,O> org.jboss.xnio.IoFuture<? extends Client<I,O>> openClient(String serviceType,
                                                                String groupName,
                                                                Class<I> requestClass,
                                                                Class<O> replyClass)
Locate and open a client on the remote side of this connection.

Type Parameters:
I - the request type
O - the reply type
Parameters:
serviceType - the service type
groupName - the group name
requestClass - the request class
replyClass - the reply class
Returns:
the future client

openClient

<I,O> org.jboss.xnio.IoFuture<? extends Client<I,O>> openClient(String serviceType,
                                                                String groupName,
                                                                Class<I> requestClass,
                                                                Class<O> replyClass,
                                                                org.jboss.xnio.OptionMap optionMap)
Locate and open a client on the remote side of this connection.

Type Parameters:
I - the request type
O - the reply type
Parameters:
serviceType - the service type
groupName - the group name
requestClass - the request class
replyClass - the reply class
optionMap - the option map
Returns:
the future client

createClientConnector

<I,O> ClientConnector<I,O> createClientConnector(RequestListener<I,O> listener,
                                                 Class<I> requestClass,
                                                 Class<O> replyClass)
                                           throws IOException
Create a client connector which may only transmitted to the remote side of this connection, allowing it to use the included service.

Type Parameters:
I - the request type
O - the reply type
Parameters:
listener - the local listener
requestClass - the request class
replyClass - the reply class
Returns:
a connector which may be sent to the connection peer
Throws:
IOException

createClientConnector

<I,O> ClientConnector<I,O> createClientConnector(RequestListener<I,O> listener,
                                                 Class<I> requestClass,
                                                 Class<O> replyClass,
                                                 org.jboss.xnio.OptionMap optionMap)
                                           throws IOException
Create a client connector which may only transmitted to the remote side of this connection, allowing it to use the included service.

Type Parameters:
I - the request type
O - the reply type
Parameters:
listener - the local listener
requestClass - the request class
replyClass - the reply class
optionMap - the option map
Returns:
a connector which may be sent to the connection peer
Throws:
IOException

JBoss Remoting 3.1.0.Beta1

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