public class DefaultXmlRpcComponent extends org.codehaus.plexus.logging.AbstractLogEnabled implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable, XmlRpcComponent
ROLE
Constructor and Description |
---|
DefaultXmlRpcComponent() |
Modifier and Type | Method and Description |
---|---|
void |
acceptClient(String address)
Add an IP address to the list of accepted clients.
|
void |
addMessageListener(XmlRpcMessageListener listener)
Add message listener.
|
void |
contextualize(org.codehaus.plexus.context.Context context) |
void |
denyClient(String address)
Add an IP address to the list of denied clients.
|
Object |
executeRpc(URL url,
String methodName,
Vector params)
Client's interface to XML-RPC.
|
void |
initialize() |
void |
messageReceived(String message)
Message received.
|
void |
registerHandler(Object handler)
Register an Object as a default handler for the service.
|
void |
registerHandler(String handlerName,
Object handler)
Register an Object as a handler for the service.
|
void |
setParanoid(boolean state)
Switch client filtering on/off.
|
void |
start() |
void |
stop() |
void |
unregisterHandler(String handlerName)
Unregister a handler.
|
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
public void initialize() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
initialize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
public void start() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException
start
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable
org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException
public void stop() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException
stop
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable
org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException
public void registerHandler(Object handler) throws org.apache.xmlrpc.XmlRpcException, IOException
registerHandler
in interface XmlRpcComponent
handler
- The handler to use.org.apache.xmlrpc.XmlRpcException
IOException
public void registerHandler(String handlerName, Object handler) throws org.apache.xmlrpc.XmlRpcException, IOException
registerHandler
in interface XmlRpcComponent
handlerName
- The name the handler is registered under.handler
- The handler to use.org.apache.xmlrpc.XmlRpcException
- If an XmlRpcException occurs.IOException
- If an IOException occurs.public void unregisterHandler(String handlerName) throws org.apache.xmlrpc.XmlRpcException
unregisterHandler
in interface XmlRpcComponent
handlerName
- The name of the handler to unregister.org.apache.xmlrpc.XmlRpcException
public Object executeRpc(URL url, String methodName, Vector params) throws Exception
executeRpc
in interface XmlRpcComponent
url
- A URL.methodName
- A String with the method name.params
- A Vector with the parameters.org.apache.xmlrpc.XmlRpcException
IOException
Exception
public void setParanoid(boolean state)
setParanoid
in interface XmlRpcComponent
state
- Whether to filter clients.acceptClient(java.lang.String)
,
denyClient(java.lang.String)
public void acceptClient(String address)
acceptClient
in interface XmlRpcComponent
address
- The address to add to the list.denyClient(java.lang.String)
,
setParanoid(boolean)
public void denyClient(String address)
denyClient
in interface XmlRpcComponent
address
- The address to add to the list.acceptClient(java.lang.String)
,
setParanoid(boolean)
public void addMessageListener(XmlRpcMessageListener listener)
addMessageListener
in interface XmlRpcComponent
public void messageReceived(String message)
messageReceived
in interface XmlRpcComponent
Copyright © 2001-2012 Codehaus. All Rights Reserved.