org.apache.xmlrpc.server

Class AbstractReflectiveHandlerMapping

public abstract class AbstractReflectiveHandlerMapping extends Object implements XmlRpcListableHandlerMapping

Abstract base class of handler mappings, which are using reflection.
Nested Class Summary
interfaceAbstractReflectiveHandlerMapping.AuthenticationHandler
An object implementing this interface may be used to validate user names and passwords.
Field Summary
protected MaphandlerMap
Method Summary
AbstractReflectiveHandlerMapping.AuthenticationHandlergetAuthenticationHandler()
Returns the authentication handler, if any, or null.
XmlRpcHandlergetHandler(String pHandlerName)
Returns the XmlRpcHandler with the given name.
String[]getListMethods()
protected StringgetMethodHelp(Class pClass, Method[] pMethods)
Creates a help string for the given method, when applied to the given class.
StringgetMethodHelp(String pHandlerName)
String[][]getMethodSignature(String pHandlerName)
RequestProcessorFactoryFactorygetRequestProcessorFactoryFactory()
Returns the mappings RequestProcessorFactoryFactory.
protected String[][]getSignature(Method[] pMethods)
Creates a signature for the given method.
TypeConverterFactorygetTypeConverterFactory()
Returns the mappings TypeConverterFactory.
protected XmlRpcHandlernewXmlRpcHandler(Class pClass, Method[] pMethods)
Creates a new instance of XmlRpcHandler.
protected voidregisterPublicMethods(String pKey, Class pType)
Searches for methods in the given class.
voidsetAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pAuthenticationHandler)
Sets the authentication handler, if any, or null.
voidsetRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)
Sets the mappings RequestProcessorFactoryFactory.
voidsetTypeConverterFactory(TypeConverterFactory pFactory)
Sets the mappings TypeConverterFactory.

Field Detail

handlerMap

protected Map handlerMap

Method Detail

getAuthenticationHandler

public AbstractReflectiveHandlerMapping.AuthenticationHandler getAuthenticationHandler()
Returns the authentication handler, if any, or null.

getHandler

public XmlRpcHandler getHandler(String pHandlerName)
Returns the XmlRpcHandler with the given name.

Parameters: pHandlerName The handlers name

Throws: XmlRpcNoSuchHandlerException A handler with the given name is unknown.

getListMethods

public String[] getListMethods()

getMethodHelp

protected String getMethodHelp(Class pClass, Method[] pMethods)
Creates a help string for the given method, when applied to the given class.

getMethodHelp

public String getMethodHelp(String pHandlerName)

getMethodSignature

public String[][] getMethodSignature(String pHandlerName)

getRequestProcessorFactoryFactory

public RequestProcessorFactoryFactory getRequestProcessorFactoryFactory()
Returns the mappings RequestProcessorFactoryFactory.

getSignature

protected String[][] getSignature(Method[] pMethods)
Creates a signature for the given method.

getTypeConverterFactory

public TypeConverterFactory getTypeConverterFactory()
Returns the mappings TypeConverterFactory.

newXmlRpcHandler

protected XmlRpcHandler newXmlRpcHandler(Class pClass, Method[] pMethods)
Creates a new instance of XmlRpcHandler.

Parameters: pClass The class, which was inspected for handler methods. This is used for error messages only. Typically, it is the same than

pInstance.getClass()
. pMethods The method being invoked.

registerPublicMethods

protected void registerPublicMethods(String pKey, Class pType)
Searches for methods in the given class. For any valid method, it creates an instance of XmlRpcHandler. Valid methods are defined as follows:

Parameters: pKey Suffix for building handler names. A dot and the method name are being added. pType The class being inspected.

setAuthenticationHandler

public void setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pAuthenticationHandler)
Sets the authentication handler, if any, or null.

setRequestProcessorFactoryFactory

public void setRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)
Sets the mappings RequestProcessorFactoryFactory. Note, that this doesn't affect already registered handlers.

setTypeConverterFactory

public void setTypeConverterFactory(TypeConverterFactory pFactory)
Sets the mappings TypeConverterFactory.
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.