JBoss Remoting 3.1.0.Beta1

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

Type Parameters:
I - the request type
O - the reply type

public interface RequestListener<I,O>

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

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
 void handleClose()
          Handle the client closing.
 void handleRequest(RequestContext<O> context, I request)
          Handle a request.
 

Method Detail

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).

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

handleClose

void handleClose()
Handle the client closing. Free up any resources. This method is called after the close has occurred, so exceptions thrown will be ignored.


JBoss Remoting 3.1.0.Beta1

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