org.apache.xmlrpc
Class XmlRpcWorker
java.lang.Object
org.apache.xmlrpc.XmlRpcWorker
public class XmlRpcWorker
extends java.lang.Object
Tie together the XmlRequestProcessor and XmlResponseProcessor to handle
a request serially in a single thread.
protected XmlRpcContext | defaultContext(String user, String password) - Factory method to return a default context object for the execute() method.
|
byte[] | execute(InputStream is, String user, String password) - Decode, process and encode the response or exception for an XML-RPC
request.
|
byte[] | execute(InputStream is, XmlRpcContext context) - Decode, process and encode the response or exception for an XML-RPC
request.
|
protected static Object | invokeHandler(Object handler, XmlRpcServerRequest request, XmlRpcContext context) - Pass the specified request to the handler.
|
XmlRpcWorker
public XmlRpcWorker(XmlRpcHandlerMapping handlerMapping)
Create a new instance that will use the specified mapping.
defaultContext
protected XmlRpcContext defaultContext(String user,
String password)
Factory method to return a default context object for the execute() method.
This method can be overridden to return a custom sub-class of XmlRpcContext.
user
- the username of the user making the request.password
- the password of the user making the request.
- XmlRpcContext the context for the reqeust.
execute
public byte[] execute(InputStream is,
String user,
String password)
Decode, process and encode the response or exception for an XML-RPC
request. This method executes the handler method with the default context.
execute
public byte[] execute(InputStream is,
XmlRpcContext context)
Decode, process and encode the response or exception for an XML-RPC
request. This method executes will pass the specified context to the
handler if the handler supports context.
is
- the InputStream to read the request from.context
- the context for the request (may be null).
invokeHandler
protected static Object invokeHandler(Object handler,
XmlRpcServerRequest request,
XmlRpcContext context)
throws Exception
handler
- the handler to call.request
- the request information to use.context
- the context information to use.
- Object the result of calling the handler.
Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.