Interface SynchronousRequestHandler

All Superinterfaces:
All Known Implementing Classes:
CgiServerDemo, ProxyingRequestHandler, SSLServerDemo, SyncServerDemo, XmlRpcProxyingRequestHandler

public interface SynchronousRequestHandler
extends RequestHandler

Interface for synchronous RPC method call handlers.

Method Summary
 RpcResponse handleRequest(RpcCall call, RpcCallContext context)
          Invoked to handle a method call.

Method Detail


RpcResponse handleRequest(RpcCall call,
                          RpcCallContext context)
                          throws java.lang.Exception
Invoked to handle a method call.

This method is responsible for processing the method synchronously. The return value will be marshalled and sent back to the client immediately.

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

If processing might be length consider using AsynchronousRequestHandler and handing off the work to an application thread.

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

call - The method call to be handled.
context - An RpcCallContext instance providing information about the call context.
An appropriate RPC response.
java.lang.Exception - Implementations are permitted to raise an exception as part of their processing.