JBoss Remoting 3.0.0.Beta2

org.jboss.remoting
Interface RequestListener<I,O>

Type Parameters:
I - the request type
O - the reply type
All Known Implementing Classes:
AbstractRequestListener, TransporterRequestListener

public interface RequestListener<I,O>

A request listener. Implementations of this interface will reply to client requests.


Method Summary
 void handleClientClose(ClientContext context)
          Handle the close of a client.
 void handleClientOpen(ClientContext context)
          Handle the opening of a client.
 void handleRequest(RequestContext<O> context, I request)
          Handle a request.
 void handleServiceClose(ServiceContext context)
          Handle the close of a service.
 void handleServiceOpen(ServiceContext context)
          Handle the opening of a service.
 

Method Detail

handleClientOpen

void handleClientOpen(ClientContext context)
Handle the opening of a client.

Parameters:
context - the client context

handleServiceOpen

void handleServiceOpen(ServiceContext context)
Handle the opening of a service.

Parameters:
context - the service context

handleRequest

void handleRequest(RequestContext<O> context,
                   I request)
                   throws RemoteExecutionException
Handle a request. If this method throws RemoteExecutionException, then that exception is passed back to the caller and the request is marked as complete. Otherwise, the request listener must send back either a reply (using the sendReply() method on the RequestContext) or an exception (using the sendException() method on the RequestContext). Failure to do so may cause the client to hang indefinitely.

Parameters:
context - the context on which a reply may be sent
request - the received request
Throws:
RemoteExecutionException - if the execution failed in some way

handleServiceClose

void handleServiceClose(ServiceContext context)
Handle the close of a service.

Parameters:
context - the service context

handleClientClose

void handleClientClose(ClientContext context)
Handle the close of a client.

Parameters:
context - the client context

JBoss Remoting 3.0.0.Beta2

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