org.apache.xmlrpc

Class SystemHandler

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).
Authors:
Adam Megacz
Andrew Evers
Daniel L. Rall
Since:
1.2

Field Summary

private DefaultHandlerMapping
systemMapping

Constructor Summary

SystemHandler()
Creates a new instance.
SystemHandler(XmlRpcHandlerMapping handlerMapping)
Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.
SystemHandler(XmlRpcServer server)
Deprecated. use new SystemHandler() and addDefaultSystemHandlers() instead.

Method Summary

void
addDefaultSystemHandlers()
Add the default system handlers.
void
addSystemHandler(String handlerName, ContextXmlRpcHandler handler)
Object
execute(String method, Vector params, XmlRpcContext context)
Execute a <ignored>.<name> call by calling the handler for <name> in the the system handler mapping.
void
removeSystemHandler(String handlerName)

Field Details

systemMapping

private DefaultHandlerMapping systemMapping

Constructor Details

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 Details

addDefaultSystemHandlers

public void addDefaultSystemHandlers()
Add the default system handlers. The default system handlers are:

addSystemHandler

public void addSystemHandler(String handlerName,
                             ContextXmlRpcHandler handler)

execute

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

removeSystemHandler

public void removeSystemHandler(String handlerName)

Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.