org.apache.xmlrpc.server
Class DynamicHandlerMapping

java.lang.Object
  extended by org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping
      extended by org.apache.xmlrpc.server.DynamicHandlerMapping
All Implemented Interfaces:
XmlRpcListableHandlerMapping, XmlRpcHandlerMapping

public class DynamicHandlerMapping
extends AbstractReflectiveHandlerMapping

A handler mapping, which requires explicit registration of handlers.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping
AbstractReflectiveHandlerMapping.AuthenticationHandler, AbstractReflectiveHandlerMapping.InitializationHandler
 
Field Summary
 
Fields inherited from class org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping
handlerMap
 
Constructor Summary
DynamicHandlerMapping(TypeConverterFactory pTypeConverterFactory, boolean pInstanceIsStateless)
          Creates a new instance.
 
Method Summary
 void addHandler(java.lang.String pKey, java.lang.Class pClass)
          Adds handlers for the given object to the mapping.
 void removeHandler(java.lang.String pKey)
          Removes all handlers with the given class key.
 
Methods inherited from class org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping
getAuthenticationHandler, getHandler, getInitializationHandler, getListMethods, getMethodHelp, getMethodHelp, getMethodSignature, getSignature, newXmlRpcHandler, registerPublicMethods, setAuthenticationHandler, setInitializationHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicHandlerMapping

public DynamicHandlerMapping(TypeConverterFactory pTypeConverterFactory,
                             boolean pInstanceIsStateless)
Creates a new instance.

Parameters:
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.
Method Detail

addHandler

public void addHandler(java.lang.String pKey,
                       java.lang.Class pClass)
                throws XmlRpcException
Adds handlers for the given object to the mapping. The handlers are build by invoking AbstractReflectiveHandlerMapping.registerPublicMethods(java.util.Map, String, Class).

Parameters:
pKey - The class key, which is passed to AbstractReflectiveHandlerMapping.registerPublicMethods(java.util.Map, String, Class).
pClass - Class, which is responsible for handling the request.
Throws:
XmlRpcException

removeHandler

public void removeHandler(java.lang.String pKey)
Removes all handlers with the given class key.



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