org.apache.xmlrpc
Class SystemHandler

java.lang.Object
  extended byorg.apache.xmlrpc.SystemHandler
All Implemented Interfaces:
ContextXmlRpcHandler

public class SystemHandler
extends java.lang.Object
implements ContextXmlRpcHandler

Wraps calls to the XML-RPC standard system.* methods (such as system.multicall).

Since:
1.2
Author:
Adam Megacz, Andrew Evers, Daniel Rall

Field Summary
private  DefaultHandlerMapping systemMapping
           
 
Constructor Summary
  SystemHandler()
          Creates a new instance.
  SystemHandler(XmlRpcHandlerMapping handlerMapping)
          Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.
protected SystemHandler(XmlRpcServer server)
          Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.
 
Method Summary
 void addDefaultSystemHandlers()
          Add the default system handlers.
 void addSystemHandler(java.lang.String handlerName, ContextXmlRpcHandler handler)
           
 java.lang.Object execute(java.lang.String method, java.util.Vector params, XmlRpcContext context)
          Execute a <ignored>.<name> call by calling the handler for <name> in the the system handler mapping.
 void removeSystemHandler(java.lang.String handlerName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemMapping

private DefaultHandlerMapping systemMapping
Constructor Detail

SystemHandler

public SystemHandler()
Creates a new instance. This instance contains no system calls. Use the addDefaultSystemHandlers() method to add the 'default' set of handlers, or add handlers manually.


SystemHandler

public SystemHandler(XmlRpcHandlerMapping handlerMapping)
Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.

Creates a new instance that delegates calls via the specified XmlRpcHandlerMapping. This method will add the system.multicall handler when a non-null handlerMapping is specified. The value itself is ignored.


SystemHandler

protected SystemHandler(XmlRpcServer server)
Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.

Creates a new instance that delegates its multicalls via the mapping used by the specified XmlRpcServer. This method will add the default handlers when the specfied server's getHandlerMapping() returns a non-null handler mapping.

Parameters:
server - The server to retrieve the XmlRpcHandlerMapping from.
Method Detail

addDefaultSystemHandlers

public void addDefaultSystemHandlers()
Add the default system handlers. The default system handlers are:
system.multicall
Make multiple XML-RPC calls in one request and receive multiple responses.


addSystemHandler

public void addSystemHandler(java.lang.String handlerName,
                             ContextXmlRpcHandler handler)
See Also:
DefaultHandlerMapping.addHandler(String, Object)

removeSystemHandler

public void removeSystemHandler(java.lang.String handlerName)
See Also:
DefaultHandlerMapping.removeHandler(String)

execute

public java.lang.Object execute(java.lang.String method,
                                java.util.Vector params,
                                XmlRpcContext context)
                         throws java.lang.Exception
Execute a <ignored>.<name> call by calling the handler for <name> in the the system handler mapping.

Specified by:
execute in interface ContextXmlRpcHandler
Throws:
java.lang.Exception
See Also:
AuthenticationFailed


Copyright © ${year} Apache Software Foundation. All Rights Reserved.