com.flat502.rox.server
Interface AsyncRequestHandler

All Superinterfaces:
RequestHandler

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

handleRequest

void handleRequest(RpcCall call,
                   ResponseChannel rspChannel)
                   throws java.lang.Exception
Deprecated. 
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.

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