Classes | |
interface | AuthenticationHandler |
Public Member Functions | |
AuthenticationHandler | getAuthenticationHandler () |
XmlRpcHandler | getHandler (String pHandlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException |
String[] | getListMethods () throws XmlRpcException |
String | getMethodHelp (String pHandlerName) throws XmlRpcException |
String[][] | getMethodSignature (String pHandlerName) throws XmlRpcException |
RequestProcessorFactoryFactory | getRequestProcessorFactoryFactory () |
TypeConverterFactory | getTypeConverterFactory () |
boolean | isVoidMethodEnabled () |
void | setAuthenticationHandler (AuthenticationHandler pAuthenticationHandler) |
void | setRequestProcessorFactoryFactory (RequestProcessorFactoryFactory pFactory) |
void | setTypeConverterFactory (TypeConverterFactory pFactory) |
void | setVoidMethodEnabled (boolean pVoidMethodEnabled) |
Protected Member Functions | |
String | getMethodHelp (Class pClass, Method[] pMethods) |
String[][] | getSignature (Method[] pMethods) |
boolean | isHandlerMethod (Method pMethod) |
XmlRpcHandler | newXmlRpcHandler (final Class pClass, final Method[] pMethods) throws XmlRpcException |
void | registerPublicMethods (String pKey, Class pType) throws XmlRpcException |
Protected Attributes | |
Map | handlerMap = new HashMap() |
Private Attributes | |
AuthenticationHandler | authenticationHandler |
RequestProcessorFactoryFactory | requestProcessorFactoryFactory = new RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory() |
TypeConverterFactory | typeConverterFactory = new TypeConverterFactoryImpl() |
boolean | voidMethodEnabled |
Abstract base class of handler mappings, which are using reflection.
Definition at line 44 of file AbstractReflectiveHandlerMapping.java.
AuthenticationHandler org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getAuthenticationHandler | ( | ) | [inline] |
Returns the authentication handler, if any, or null.
Definition at line 92 of file AbstractReflectiveHandlerMapping.java.
XmlRpcHandler org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getHandler | ( | String | pHandlerName | ) | throws XmlRpcNoSuchHandlerException, XmlRpcException [inline] |
Returns the XmlRpcHandler with the given name.
pHandlerName | The handlers name |
XmlRpcNoSuchHandlerException | A handler with the given name is unknown. |
Implements org.apache.xmlrpc.server.XmlRpcHandlerMapping.
Definition at line 210 of file AbstractReflectiveHandlerMapping.java.
String [] org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getListMethods | ( | ) | throws XmlRpcException [inline] |
This method implements the introspection method system.listMethods
, which is specified as follows: <cite>
This method may be used to enumerate the methods implemented by the XML-RPC server.
The system.listMethods
method requires no parameters. It returns an array of strings, each of which is the name of a method implemented by the server. </cite>
Note, that the specification doesn't require that the list must be exhaustive. We conclude, that a valid method "handlerName" doesn't need to be in the list. For example, a handler, which implements XmlRpcHandler, but not XmlRpcMetaDataHandler, should possibly excluded: Otherwise, the listable handler mapping could not provide meaningful replies to system.methodSignature
, and system.methodHelp
.
XmlRpcException | An internal error occurred. |
Implements org.apache.xmlrpc.metadata.XmlRpcListableHandlerMapping.
Definition at line 219 of file AbstractReflectiveHandlerMapping.java.
String org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getMethodHelp | ( | Class | pClass, |
Method[] | pMethods | ||
) | [inline, protected] |
Creates a help string for the given method, when applied to the given class.
Definition at line 201 of file AbstractReflectiveHandlerMapping.java.
String org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getMethodHelp | ( | String | pHandlerName | ) | throws XmlRpcException [inline] |
This method implements the introspection method system.methodSignature
, which is specified as follows: <cite>
This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns a documentation string describing the use of that method. If no such string is available, an empty string is returned.
The documentation string may contain HTML markup. </cite>
Implements org.apache.xmlrpc.metadata.XmlRpcListableHandlerMapping.
Definition at line 232 of file AbstractReflectiveHandlerMapping.java.
String [][] org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getMethodSignature | ( | String | pHandlerName | ) | throws XmlRpcException [inline] |
This method implements the introspection method system.methodSignature
, which is specified as follows: <cite>
This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns an array of possible signatures for this method. A signature is an array of types. The first of these types is the return type of the method, the rest are parameters.
Multiple signatures (ie. overloading) are permitted: this is the reason that an array of signatures are returned by this method.
Signatures themselves are restricted to the top level parameters expected by a method. For instance if a method expects one array of structs as a parameter, and it returns a string, its signature is simply "string, array". If it expects three integers, its signature is "string, int, int, int".
If no signature is defined for the method, a none-array value is returned. Therefore this is the way to test for a non-signature, if $resp below is the response object from a method call to system.methodSignature:
$v=$resp->value(); if ($v->kindOf()!="array") { // then the method did not have a signature defined }
See the introspect.php demo included in this distribution for an example of using this method. </cite>
Implements org.apache.xmlrpc.metadata.XmlRpcListableHandlerMapping.
Definition at line 240 of file AbstractReflectiveHandlerMapping.java.
RequestProcessorFactoryFactory org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getRequestProcessorFactoryFactory | ( | ) | [inline] |
Returns the mappings RequestProcessorFactoryFactory.
Definition at line 86 of file AbstractReflectiveHandlerMapping.java.
String [][] org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getSignature | ( | Method[] | pMethods | ) | [inline, protected] |
Creates a signature for the given method.
Definition at line 194 of file AbstractReflectiveHandlerMapping.java.
TypeConverterFactory org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getTypeConverterFactory | ( | ) | [inline] |
Returns the mappings TypeConverterFactory.
Definition at line 73 of file AbstractReflectiveHandlerMapping.java.
boolean org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.isHandlerMethod | ( | Method | pMethod | ) | [inline, protected] |
Definition at line 102 of file AbstractReflectiveHandlerMapping.java.
boolean org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.isVoidMethodEnabled | ( | ) | [inline] |
Returns, whether void methods are enabled. By default, null values aren't supported by XML-RPC and void methods are in fact returning null (at least from the perspective of reflection).
Definition at line 253 of file AbstractReflectiveHandlerMapping.java.
XmlRpcHandler org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.newXmlRpcHandler | ( | final Class | pClass, |
final Method[] | pMethods | ||
) | throws XmlRpcException [inline, protected] |
Creates a new instance of XmlRpcHandler.
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. |
Definition at line 179 of file AbstractReflectiveHandlerMapping.java.
void org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.registerPublicMethods | ( | String | pKey, |
Class | pType | ||
) | throws XmlRpcException [inline, protected] |
Searches for methods in the given class. For any valid method, it creates an instance of XmlRpcHandler. Valid methods are defined as follows:
pKey | Suffix for building handler names. A dot and the method name are being added. |
pType | The class being inspected. |
Definition at line 143 of file AbstractReflectiveHandlerMapping.java.
void org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.setAuthenticationHandler | ( | AuthenticationHandler | pAuthenticationHandler | ) | [inline] |
Sets the authentication handler, if any, or null.
Definition at line 98 of file AbstractReflectiveHandlerMapping.java.
void org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.setRequestProcessorFactoryFactory | ( | RequestProcessorFactoryFactory | pFactory | ) | [inline] |
Sets the mappings RequestProcessorFactoryFactory. Note, that this doesn't affect already registered handlers.
Definition at line 80 of file AbstractReflectiveHandlerMapping.java.
void org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.setTypeConverterFactory | ( | TypeConverterFactory | pFactory | ) | [inline] |
Sets the mappings TypeConverterFactory.
Definition at line 66 of file AbstractReflectiveHandlerMapping.java.
void org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.setVoidMethodEnabled | ( | boolean | pVoidMethodEnabled | ) | [inline] |
Sets, whether void methods are enabled. By default, null values aren't supported by XML-RPC and void methods are in fact returning null (at least from the perspective of reflection).
Definition at line 262 of file AbstractReflectiveHandlerMapping.java.
AuthenticationHandler org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.authenticationHandler [private] |
Definition at line 59 of file AbstractReflectiveHandlerMapping.java.
Map org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.handlerMap = new HashMap() [protected] |
Definition at line 58 of file AbstractReflectiveHandlerMapping.java.
RequestProcessorFactoryFactory org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.requestProcessorFactoryFactory = new RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory() [private] |
Definition at line 60 of file AbstractReflectiveHandlerMapping.java.
TypeConverterFactory org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.typeConverterFactory = new TypeConverterFactoryImpl() [private] |
Definition at line 57 of file AbstractReflectiveHandlerMapping.java.
Definition at line 61 of file AbstractReflectiveHandlerMapping.java.