org.apache.xmlrpc.server
Class ReflectiveXmlRpcHandler
java.lang.Object
org.apache.xmlrpc.server.ReflectiveXmlRpcHandler
- All Implemented Interfaces:
- XmlRpcHandler
- Direct Known Subclasses:
- ReflectiveXmlRpcMetaDataHandler
public class ReflectiveXmlRpcHandler
- extends java.lang.Object
- implements XmlRpcHandler
Default implementation of XmlRpcHandler
.
Method Summary |
java.lang.Object |
execute(XmlRpcRequest pRequest)
Performs the request and returns the result object. |
protected java.lang.Object |
newInstance()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectiveXmlRpcHandler
public ReflectiveXmlRpcHandler(AbstractReflectiveHandlerMapping pMapping,
TypeConverterFactory pTypeConverterFactory,
java.lang.Class pClass,
boolean pInstanceIsStateless,
java.lang.reflect.Method[] pMethods)
throws XmlRpcException
- Creates a new instance.
- Parameters:
pMapping
- The mapping, which creates this handler.pClass
- The class, which has been inspected to create
this handler. Typically, this will be the same as
pInstance.getClass()
. It is used for diagnostic
messages only.pInstanceIsStateless
- The handler
can operate in either of two operation modes:
- The object, which is actually performing the requests,
is initialized at startup. In other words, there is only
one object, which is performing all the requests.
Obviously, this is the faster operation mode. On the
other hand, it has the disadvantage, that the object
must be stateless.
- A new object is created for any request. This is slower,
because the object needs to be initialized. On the other
hand, it allows for stateful objects, which may take
request specific configuration like the clients IP address,
and the like.
pMethods
- The method, which will be invoked for
executing the handler.
- Throws:
XmlRpcException
execute
public java.lang.Object execute(XmlRpcRequest pRequest)
throws XmlRpcException
- Description copied from interface:
XmlRpcHandler
- Performs the request and returns the result object.
- Specified by:
execute
in interface XmlRpcHandler
- Parameters:
pRequest
- The request being performed (method name and
parameters.)
- Returns:
- The result object.
- Throws:
XmlRpcException
- Performing the request failed.
newInstance
protected java.lang.Object newInstance()
throws XmlRpcException
- Throws:
XmlRpcException
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.