JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3
Class Remoting

java.lang.Object
  extended by org.jboss.remoting3.Remoting

public final class Remoting
extends Object

The standalone interface into Remoting. This class contains static methods that are useful to standalone programs for managing endpoints and services in a simple fashion.


Method Summary
static Endpoint createEndpoint(String endpointName, Executor executor, org.jboss.xnio.OptionMap optionMap)
          Create an endpoint configured with the given option map.
static
<I,O> Client<I,O>
createLocalClient(Endpoint endpoint, RequestListener<I,O> requestListener, Class<I> requestClass, Class<O> replyClass)
          Create a local client from a request listener.
static Endpoint getConfiguredEndpoint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConfiguredEndpoint

public static Endpoint getConfiguredEndpoint()
                                      throws IOException
Throws:
IOException

createEndpoint

public static Endpoint createEndpoint(String endpointName,
                                      Executor executor,
                                      org.jboss.xnio.OptionMap optionMap)
                               throws IOException
Create an endpoint configured with the given option map. The following options are supported:

Parameters:
endpointName - the endpoint name
executor - the thread pool to use
optionMap - the endpoint options
Returns:
the endpoint
Throws:
IOException - if an error occurs

createLocalClient

public static <I,O> Client<I,O> createLocalClient(Endpoint endpoint,
                                                  RequestListener<I,O> requestListener,
                                                  Class<I> requestClass,
                                                  Class<O> replyClass)
                                     throws IOException
Create a local client from a request listener. The client will retain the sole reference to the request listener, so when the client is closed, the listener will also be closed (unless the client is sent to a remote endpoint).

Type Parameters:
I - the request type
O - the reply type
Parameters:
endpoint - the endpoint to bind the request listener to
requestListener - the request listener
requestClass - the request class
replyClass - the reply class
Returns:
a new client
Throws:
IOException - if an error occurs

JBoss Remoting 3.1.0.Beta1

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