org.apache.turbine.services.xmlrpc
Interface XmlRpcService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineXmlRpcService

public interface XmlRpcService
extends Service

The interface an XmlRpcService implements.

Version:
$Id: XmlRpcService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Josh Lucas, Magnús Þór Torfason, Rafal Krzewski, Jason van Zyl

Field Summary
static java.lang.String SERVICE_NAME
          TurbineXmlRpcService.
 
Method Summary
 void acceptClient(java.lang.String address)
          Add an IP address to the list of accepted clients.
 void denyClient(java.lang.String address)
          Add an IP address to the list of denied clients.
 java.lang.Object executeAuthenticatedRpc(java.net.URL url, java.lang.String username, java.lang.String password, java.lang.String methodName, java.util.Vector params)
          Execute a remote procedure call taht requires authentication.
 java.lang.Object executeRpc(java.net.URL url, java.lang.String methodName, java.util.Vector params)
          Execute a remote procedure call.
 void get(java.lang.String serverURL, java.lang.String sourceLocationProperty, java.lang.String sourceFileName, java.lang.String destinationLocationProperty, java.lang.String destinationFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 void get(java.lang.String serverURL, java.lang.String username, java.lang.String password, java.lang.String sourceLocationProperty, java.lang.String sourceFileName, java.lang.String destinationLocationProperty, java.lang.String destinationFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 byte[] handleRequest(java.io.InputStream is)
          Handle an XML-RPC request using the encapsulated server.
 byte[] handleRequest(java.io.InputStream is, java.lang.String user, java.lang.String password)
          Handle an XML-RPC request using the encapsulated server with user authentication.
 void registerHandler(java.lang.Object handler)
          Register an object as a the default handler for the XmlRpc Server part.
 void registerHandler(java.lang.String handlerName, java.lang.Object handler)
          Register an object as a handler for the XmlRpc Server part.
 void remove(java.lang.String serverURL, java.lang.String sourceLocationProperty, java.lang.String sourceFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 void remove(java.lang.String serverURL, java.lang.String username, java.lang.String password, java.lang.String sourceLocationProperty, java.lang.String sourceFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 void send(java.lang.String serverURL, java.lang.String sourceLocationProperty, java.lang.String sourceFileName, java.lang.String destinationLocationProperty, java.lang.String destinationFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 void send(java.lang.String serverURL, java.lang.String username, java.lang.String password, java.lang.String sourceLocationProperty, java.lang.String sourceFileName, java.lang.String destinationLocationProperty, java.lang.String destinationFileName)
          Deprecated. This is not scope of the Service itself but of an application which uses the service.
 void setParanoid(boolean state)
          Switch client filtering on/off.
 void unregisterHandler(java.lang.String handlerName)
          Unregister a handler.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
TurbineXmlRpcService.

See Also:
Constant Field Values
Method Detail

executeRpc

public java.lang.Object executeRpc(java.net.URL url,
                                   java.lang.String methodName,
                                   java.util.Vector params)
                            throws TurbineException
Execute a remote procedure call.

Parameters:
url - A URL.
methodName - A String with the method name.
params - A Vector with the parameters.
Returns:
An Object.
Throws:
TurbineException

executeAuthenticatedRpc

public java.lang.Object executeAuthenticatedRpc(java.net.URL url,
                                                java.lang.String username,
                                                java.lang.String password,
                                                java.lang.String methodName,
                                                java.util.Vector params)
                                         throws TurbineException
Execute a remote procedure call taht requires authentication.

Parameters:
url - A URL.
username - The username to authenticate with
password - The password to authenticate with
methodName - A String with the method name.
params - A Vector with the parameters.
Returns:
An Object.
Throws:
TurbineException

registerHandler

public void registerHandler(java.lang.String handlerName,
                            java.lang.Object handler)
Register an object as a handler for the XmlRpc Server part.

Parameters:
handlerName - The name under which we want to register the service
handler - The handler object

registerHandler

public void registerHandler(java.lang.Object handler)
Register an object as a the default handler for the XmlRpc Server part.

Parameters:
handler - The handler object

unregisterHandler

public void unregisterHandler(java.lang.String handlerName)
Unregister a handler.

Parameters:
handlerName - The name of the handler to unregister.

handleRequest

public byte[] handleRequest(java.io.InputStream is)
Handle an XML-RPC request using the encapsulated server. You can use this method to handle a request from within a Turbine screen.

Parameters:
is - the stream to read request data from.
Returns:
the response body that needs to be sent to the client.

handleRequest

public byte[] handleRequest(java.io.InputStream is,
                            java.lang.String user,
                            java.lang.String password)
Handle an XML-RPC request using the encapsulated server with user authentication. You can use this method to handle a request from within a Turbine screen.

Note that the handlers need to implement AuthenticatedXmlRpcHandler interface to access the authentication infomration.

Parameters:
is - the stream to read request data from.
user - the user that is making the request.
password - the password given by user.
Returns:
the response body that needs to be sent to the client.

send

public void send(java.lang.String serverURL,
                 java.lang.String sourceLocationProperty,
                 java.lang.String sourceFileName,
                 java.lang.String destinationLocationProperty,
                 java.lang.String destinationFileName)
          throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to send a file to a server.

Parameters:
serverURL -
sourceLocationProperty -
sourceFileName -
destinationLocationProperty -
destinationFileName -
Throws:
TurbineException

send

public void send(java.lang.String serverURL,
                 java.lang.String username,
                 java.lang.String password,
                 java.lang.String sourceLocationProperty,
                 java.lang.String sourceFileName,
                 java.lang.String destinationLocationProperty,
                 java.lang.String destinationFileName)
          throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to send a file to a server that requires authentication

Parameters:
serverURL -
username -
password -
sourceLocationProperty -
sourceFileName -
destinationLocationProperty -
destinationFileName -
Throws:
TurbineException

get

public void get(java.lang.String serverURL,
                java.lang.String sourceLocationProperty,
                java.lang.String sourceFileName,
                java.lang.String destinationLocationProperty,
                java.lang.String destinationFileName)
         throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to send a file to a server.

Parameters:
serverURL -
sourceLocationProperty -
sourceFileName -
destinationLocationProperty -
destinationFileName -
Throws:
TurbineException

get

public void get(java.lang.String serverURL,
                java.lang.String username,
                java.lang.String password,
                java.lang.String sourceLocationProperty,
                java.lang.String sourceFileName,
                java.lang.String destinationLocationProperty,
                java.lang.String destinationFileName)
         throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to send a file to a server that requires authentication

Parameters:
serverURL -
username -
password -
sourceLocationProperty -
sourceFileName -
destinationLocationProperty -
destinationFileName -
Throws:
TurbineException

remove

public void remove(java.lang.String serverURL,
                   java.lang.String sourceLocationProperty,
                   java.lang.String sourceFileName)
            throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to remove a file from the server

Parameters:
serverURL -
sourceLocationProperty -
sourceFileName -
Throws:
TurbineException

remove

public void remove(java.lang.String serverURL,
                   java.lang.String username,
                   java.lang.String password,
                   java.lang.String sourceLocationProperty,
                   java.lang.String sourceFileName)
            throws TurbineException
Deprecated. This is not scope of the Service itself but of an application which uses the service.

Method to allow a client to remove a file from a server that requires authentication

Parameters:
serverURL -
username -
password -
sourceLocationProperty -
sourceFileName -
Throws:
TurbineException

setParanoid

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

Parameters:
state -
See Also:
acceptClient(java.lang.String), denyClient(java.lang.String)

acceptClient

public void acceptClient(java.lang.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 -
See Also:
denyClient(java.lang.String), setParanoid(boolean)

denyClient

public void denyClient(java.lang.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 -
See Also:
acceptClient(java.lang.String), setParanoid(boolean)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.