com.lightdev.app.trec.client
Class Request

java.lang.Object
  extended by com.lightdev.app.trec.client.Request

public class Request
extends Object

A request as expected by a Client object of the Light Development Transparent Remote Computing (TREC) platform.

Version:
2, 31.12.2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Constructor Summary
Request(String agentName, String methodName)
          create a new instance of a Request object
 
Method Summary
 void addParameter(Object parameter)
          add a parameter to this request The TREC platform uses Apache XML-RPC for all communication between clients and servers.
 String getAgentName()
          get name of agent this request is meant for
 String getMethodName()
          get name of method this request is meant to call
 Vector getParameters()
          get the parameter vector of this request
 void setParameters(Vector parameters)
          set all parameters of this request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Request

public Request(String agentName,
               String methodName)
create a new instance of a Request object

Parameters:
methodName - name of remote method to call
agentName - name of agent to call
Method Detail

setParameters

public void setParameters(Vector parameters)
set all parameters of this request

Parameters:
parameters - a vector with all parameters

addParameter

public void addParameter(Object parameter)
add a parameter to this request

The TREC platform uses Apache XML-RPC for all communication between clients and servers. When a data type is not supported by XML-RPC it needs to be serialized to a byte array. The parameter vector expects all parameters to be valid XML-RPC types. Use methods serialize and deserialize of class Client to transform not supported types or implement a custom serialization/deserialization method in a subclass of Client.

For a listing of types supported by XML-RPC see http://ws.apache.org/xmlrpc/types.html

Parameters:
parameter - the parameter to add

getAgentName

public String getAgentName()
get name of agent this request is meant for

Returns:
name of agent

getMethodName

public String getMethodName()
get name of method this request is meant to call

Returns:
method name

getParameters

public Vector getParameters()
get the parameter vector of this request

Returns:
a vector with all parameters