Interface AsyncRequestHandler

All Superinterfaces:

Deprecated. Use AsynchronousRequestHandler instead.

public interface AsyncRequestHandler
extends RequestHandler

Interface for asynchronous RPC method call handlers.

See Also:
HttpRpcServer.registerHandler(String, String, AsyncRequestHandler)

Method Summary
 void handleRequest(RpcCall call, ResponseChannel rspChannel)
          Deprecated. Invoked to handle a method call.

Method Detail


void handleRequest(RpcCall call,
                   ResponseChannel rspChannel)
                   throws java.lang.Exception
Invoked to handle a method call.

This method is responsible for processing the method asynchronously. Responses can be sent using the ResponseChannel.respond(RpcResponse) method.

Although an implement could do all of its work using the calling thread the intention of this interface is to support handing off the work to an application thread.

The caller is one of the underlying worker threads (see HttpRpcProcessor.addWorker()) and as such should process the method as quickly as possible.

If an exception is raised it will be returned to the caller as an RPC fault.

call - The method call to be handled.
rspChannel - A handle to a logic channel that can be used when a response is ready.
java.lang.Exception - Implementations are permitted to raise an exception as part of their processing.