org.codehaus.plexus.xmlrpc

Class DefaultXmlRpcComponent

public class DefaultXmlRpcComponent extends AbstractLogEnabled implements Contextualizable, Initializable, Startable, XmlRpcComponent

Version: $Id: DefaultXmlRpcComponent.java 2752 2005-10-24 10:41:24Z evenisse $

Author: Jason van Zyl

UNKNOWN: Handle XmlRpc.setDebug(boolean)

Method Summary
voidacceptClient(String address)
Add an IP address to the list of accepted clients.
voidaddMessageListener(XmlRpcMessageListener listener)
Add message listener.
voidcontextualize(Context context)
voiddenyClient(String address)
Add an IP address to the list of denied clients.
ObjectexecuteRpc(URL url, String methodName, Vector params)
Client's interface to XML-RPC.
voidinitialize()
voidmessageReceived(String message)
Message received.
voidregisterHandler(Object handler)
Register an Object as a default handler for the service.
voidregisterHandler(String handlerName, Object handler)
Register an Object as a handler for the service.
voidsetParanoid(boolean state)
Switch client filtering on/off.
voidstart()
voidstop()
voidunregisterHandler(String handlerName)
Unregister a handler.

Method Detail

acceptClient

public void acceptClient(String address)
Add an IP address to the list of accepted clients. The parameter can contain '*' as wildcard character, e.g. "192.168.*.*". You must call setParanoid(true) in order for this to have any effect.

Parameters: address The address to add to the list.

See Also: DefaultXmlRpcComponent DefaultXmlRpcComponent

addMessageListener

public void addMessageListener(XmlRpcMessageListener listener)
Add message listener.

contextualize

public void contextualize(Context context)

denyClient

public void denyClient(String address)
Add an IP address to the list of denied clients. The parameter can contain '*' as wildcard character, e.g. "192.168.*.*". You must call setParanoid(true) in order for this to have any effect.

Parameters: address The address to add to the list.

See Also: DefaultXmlRpcComponent DefaultXmlRpcComponent

executeRpc

public Object executeRpc(URL url, String methodName, Vector params)
Client's interface to XML-RPC. The return type is Object which you'll need to cast to whatever you are expecting.

Parameters: url A URL. methodName A String with the method name. params A Vector with the parameters.

Returns: An Object.

Throws: XmlRpcException IOException

initialize

public void initialize()

messageReceived

public void messageReceived(String message)
Message received.

registerHandler

public void registerHandler(Object handler)
Register an Object as a default handler for the service.

Parameters: handler The handler to use.

Throws: XmlRpcException IOException

registerHandler

public void registerHandler(String handlerName, Object handler)
Register an Object as a handler for the service.

Parameters: handlerName The name the handler is registered under. handler The handler to use.

Throws: XmlRpcException If an XmlRpcException occurs. IOException If an IOException occurs.

setParanoid

public void setParanoid(boolean state)
Switch client filtering on/off.

Parameters: state Whether to filter clients.

See Also: DefaultXmlRpcComponent DefaultXmlRpcComponent

start

public void start()

stop

public void stop()

unregisterHandler

public void unregisterHandler(String handlerName)
Unregister a handler.

Parameters: handlerName The name of the handler to unregister.

Copyright © 2001-2007 Codehaus. All Rights Reserved.