org.apache.xmlrpc.metadata
Class ReflectiveXmlRpcMetaDataHandler

java.lang.Object
  extended by org.apache.xmlrpc.server.ReflectiveXmlRpcHandler
      extended by org.apache.xmlrpc.metadata.ReflectiveXmlRpcMetaDataHandler
All Implemented Interfaces:
XmlRpcMetaDataHandler, XmlRpcHandler

public class ReflectiveXmlRpcMetaDataHandler
extends ReflectiveXmlRpcHandler
implements XmlRpcMetaDataHandler

Default implementation of XmlRpcMetaDataHandler.


Constructor Summary
ReflectiveXmlRpcMetaDataHandler(AbstractReflectiveHandlerMapping pMapping, TypeConverterFactory pTypeConverterFactory, java.lang.Class pClass, boolean pInstanceIsStateless, java.lang.reflect.Method[] pMethods, java.lang.String[][] pSignatures, java.lang.String pMethodHelp)
          Creates a new instance.
 
Method Summary
 java.lang.String getMethodHelp()
          This method may be used to implement XmlRpcListableHandlerMapping.getMethodHelp(String).
 java.lang.String[][] getSignatures()
          This method may be used to implement XmlRpcListableHandlerMapping.getMethodSignature(String).
 
Methods inherited from class org.apache.xmlrpc.server.ReflectiveXmlRpcHandler
execute, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xmlrpc.XmlRpcHandler
execute
 

Constructor Detail

ReflectiveXmlRpcMetaDataHandler

public ReflectiveXmlRpcMetaDataHandler(AbstractReflectiveHandlerMapping pMapping,
                                       TypeConverterFactory pTypeConverterFactory,
                                       java.lang.Class pClass,
                                       boolean pInstanceIsStateless,
                                       java.lang.reflect.Method[] pMethods,
                                       java.lang.String[][] pSignatures,
                                       java.lang.String pMethodHelp)
                                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:
  1. 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.
  2. 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.
pSignatures - The signature, which will be returned by getSignatures().
pMethodHelp - The help string, which will be returned by getMethodHelp().
Throws:
XmlRpcException
Method Detail

getSignatures

public java.lang.String[][] getSignatures()
                                   throws XmlRpcException
Description copied from interface: XmlRpcMetaDataHandler

This method may be used to implement XmlRpcListableHandlerMapping.getMethodSignature(String). Typically, the handler mapping will pick up the matching handler, invoke its method XmlRpcMetaDataHandler.getSignatures(), and return the result.

Method handlers, which are created by the AbstractReflectiveHandlerMapping, will typically return a single signature only.

Specified by:
getSignatures in interface XmlRpcMetaDataHandler
Returns:
An array of arrays. Any element in the outer array is a signature. The elements in the inner array are being concatenated with commas. The inner arrays first element is the return type, followed by the parameter types.
Throws:
XmlRpcException

getMethodHelp

public java.lang.String getMethodHelp()
                               throws XmlRpcException
Description copied from interface: XmlRpcMetaDataHandler

This method may be used to implement XmlRpcListableHandlerMapping.getMethodHelp(String). Typically, the handler mapping will pick up the matching handler, invoke its method XmlRpcMetaDataHandler.getMethodHelp(), and return the result.

Specified by:
getMethodHelp in interface XmlRpcMetaDataHandler
Throws:
XmlRpcException


Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.