org.apache.xmlrpc
public class XmlRpcWorker extends Object
Since: 1.2
See Also: XmlRpcServer
| Field Summary | |
|---|---|
| protected XmlRpcHandlerMapping | handlerMapping |
| protected XmlRpcRequestProcessor | requestProcessor |
| protected XmlRpcResponseProcessor | responseProcessor |
| Constructor Summary | |
|---|---|
| XmlRpcWorker(XmlRpcHandlerMapping handlerMapping)
Create a new instance that will use the specified mapping. | |
| Method Summary | |
|---|---|
| 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. |
Parameters: user the username of the user making the request. password the password of the user making the request.
Returns: XmlRpcContext the context for the reqeust.
Parameters: is the InputStream to read the request from. context the context for the request (may be null).
Returns: byte[] the response.
Throws: org.apache.xmlrpc.ParseFailed if the request could not be parsed. org.apache.xmlrpc.AuthenticationFailed if the handler for the specific method required authentication and insufficient credentials were supplied.
Parameters: handler the handler to call. request the request information to use. context the context information to use.
Returns: Object the result of calling the handler.
Throws: ClassCastException if the handler is not of an appropriate type. NullPointerException if the handler is null. Exception if the handler throws an exception.