at.spardat.xma.baserpc
Class BaseRPCClient

java.lang.Object
  extended byat.spardat.xma.baserpc.BaseRPCClient

public class BaseRPCClient
extends java.lang.Object

Client side class to make a base RPC. Usage:

     BaseRPCClient        rpc = new BaseRPCClient ("myRPC");
     // set parameters
     rpc.setParameter (1, "toServer");
     // execute
     rpc.execute();
     // read output parameters
     ... getParameter (1, "fromServer");
 
This class is for framework-internal use only.


Constructor Summary
BaseRPCClient(java.lang.String name, java.lang.String serverRessource, XMASessionClient session)
          Constructor.
 
Method Summary
 void execute()
          Executes this RPC.
 java.lang.Object getParameter(int id)
          Returns a parameter set at the server side.
 java.util.Collection getUnserializableCollection(int id)
          Returns a Collection from the server.
 void setNeedEncryption(boolean needEncryption)
          Determines if data has to be send encrypted.
 void setParameter(int id, java.lang.Object value)
          Sets a parameter transferred that is to be transferred to the server.
 void setUnserializableCollection(int id, java.util.Collection value)
          Sets a parameter that should be transferred to the server which is a collection that should not be serialized directly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRPCClient

public BaseRPCClient(java.lang.String name,
                     java.lang.String serverRessource,
                     XMASessionClient session)
Constructor.

Parameters:
name - the name of the base rpc. Used at the server side to discriminate among different calls.
serverRessource - the name of the servlet-ressource that is responsible for handling the request at the server.
session - the client's session.
Method Detail

setParameter

public void setParameter(int id,
                         java.lang.Object value)
Sets a parameter transferred that is to be transferred to the server.

Parameters:
id - a numeric id of the parameter. Must not be less than zero and greater than 127.
value - serializable object. Must not be null.

getParameter

public java.lang.Object getParameter(int id)
Returns a parameter set at the server side.

Parameters:
id - numeric id of the parameter
Returns:
object or null if there is no such parameter.

setUnserializableCollection

public void setUnserializableCollection(int id,
                                        java.util.Collection value)
Sets a parameter that should be transferred to the server which is a collection that should not be serialized directly.

Parameters:
id - a numeric id of the parameter. Must not be less than zero and greater than 127.
value - collection of objects that must be serializable themselves.

getUnserializableCollection

public java.util.Collection getUnserializableCollection(int id)
Returns a Collection from the server. Please not that the concrete subtype of Collection may be different from that provided via setUnserializableCollection at the server side.

Parameters:
id - numeric id of the parameter.
Returns:
collection of objects. You cannot make any assumptions on the concrete type of the returned value.

execute

public void execute()
Executes this RPC.


setNeedEncryption

public void setNeedEncryption(boolean needEncryption)
Determines if data has to be send encrypted.

Parameters:
needEncryption - if true https will be used for transport.