|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xmlrpc.server.AbstractReflectiveHandlerMapping
org.apache.xmlrpc.server.PropertyHandlerMapping
public class PropertyHandlerMapping
A handler mapping based on a property file. The property file contains a set of properties. The property key is taken as the handler name. The property value is taken as the name of a class being instantiated. For any non-void, non-static, and public method in the class, an entry in the handler map is generated. A typical use would be, to specify interface names as the property keys and implementations as the values.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping |
|---|
AbstractReflectiveHandlerMapping.AuthenticationHandler |
| Field Summary |
|---|
| Fields inherited from class org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping |
|---|
handlerMap |
| Constructor Summary | |
|---|---|
PropertyHandlerMapping()
|
|
| Method Summary | |
|---|---|
void |
addHandler(java.lang.String pKey,
java.lang.Class pClass)
Adds handlers for the given object to the mapping. |
void |
load(java.lang.ClassLoader pClassLoader,
java.util.Map pMap)
Reads handler definitions from an existing Map. |
void |
load(java.lang.ClassLoader pClassLoader,
java.lang.String pResource)
Reads handler definitions from a resource file. |
void |
load(java.lang.ClassLoader pClassLoader,
java.net.URL pURL)
Reads handler definitions from a property file. |
protected java.lang.Class |
newHandlerClass(java.lang.ClassLoader pClassLoader,
java.lang.String pClassName)
|
void |
removeHandler(java.lang.String pKey)
Removes all handlers with the given class key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyHandlerMapping()
| Method Detail |
|---|
public void load(java.lang.ClassLoader pClassLoader,
java.lang.String pResource)
throws java.io.IOException,
XmlRpcException
pClassLoader - The class loader being used to load
handler classes.pResource - The resource being used, for example
"org/apache/xmlrpc/webserver/XmlRpcServlet.properties"
java.io.IOException - Loading the property file failed.
XmlRpcException - Initializing the handlers failed.
public void load(java.lang.ClassLoader pClassLoader,
java.net.URL pURL)
throws java.io.IOException,
XmlRpcException
pClassLoader - The class loader being used to load
handler classes.pURL - The URL from which to load the property file
java.io.IOException - Loading the property file failed.
XmlRpcException - Initializing the handlers failed.
public void load(java.lang.ClassLoader pClassLoader,
java.util.Map pMap)
throws XmlRpcException
pClassLoader - The class loader being used to load
handler classes.pMap - The existing Map to read from
XmlRpcException - Initializing the handlers failed.
protected java.lang.Class newHandlerClass(java.lang.ClassLoader pClassLoader,
java.lang.String pClassName)
throws XmlRpcException
XmlRpcException
public void addHandler(java.lang.String pKey,
java.lang.Class pClass)
throws XmlRpcException
AbstractReflectiveHandlerMapping.registerPublicMethods(String, Class).
pKey - The class key, which is passed
to AbstractReflectiveHandlerMapping.registerPublicMethods(String, Class).pClass - Class, which is responsible for handling the request.
XmlRpcExceptionpublic void removeHandler(java.lang.String pKey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||