org.apache.xmlrpc

Class DefaultHandlerMapping

public class DefaultHandlerMapping extends Object implements XmlRpcHandlerMapping

Provide a default handler mapping, used by the XmlRpcServer. This mapping supports the special handler name "$default" that will handle otherwise unhandled requests.

Since: 1.2

Author: Hannes Wallnoefer Daniel L. Rall Andrew Evers

See Also: XmlRpcServer

Field Summary
Hashtablehandlers
Constructor Summary
DefaultHandlerMapping()
Create a new mapping.
Method Summary
voidaddHandler(String handlerName, Object handler)
Register a handler object with this name.
ObjectgetHandler(String methodName)
Find the handler and its method name for a given method.
voidremoveHandler(String handlerName)
Remove a handler object that was previously registered with this server.

Field Detail

handlers

private Hashtable handlers

Constructor Detail

DefaultHandlerMapping

public DefaultHandlerMapping()
Create a new mapping.

Method Detail

addHandler

public void addHandler(String handlerName, Object handler)
Register a handler object with this name. Methods of this objects will be callable over XML-RPC as "handlername.methodname". For more information about XML-RPC handlers see the main documentation page.

Parameters: handlername The name to identify the handler by. handler The handler itself.

getHandler

public Object getHandler(String methodName)
Find the handler and its method name for a given method. Implements the XmlRpcHandlerMapping interface.

Parameters: methodName The name of the XML-RPC method to find a handler for (this is not the Java method name).

Returns: A handler object and method name.

See Also: getHandler

removeHandler

public void removeHandler(String handlerName)
Remove a handler object that was previously registered with this server.

Parameters: handlerName The name identifying the handler to remove.

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