at.spardat.xma.rpc
Class RemoteCall

java.lang.Object
  extended byat.spardat.xma.rpc.RemoteOperation
      extended byat.spardat.xma.rpc.RemoteCall
Direct Known Subclasses:
RemoteCallClient, RemoteCallServer

public abstract class RemoteCall
extends RemoteOperation

Client and server side abstraction of a remote call, i.e., a call from XMA client to XMA server.


Field Summary
protected  at.spardat.xma.rpc.RemoteCallData data_
          The data actually transferred from client to the server
 
Constructor Summary
protected RemoteCall()
          Default constructor.
 
Method Summary
 RemoteReply execute()
          Executes this RemoteCall.
 at.spardat.xma.rpc.RemoteCallData getCallData()
          Returns the data for package internal use
 java.lang.String getEventName()
          Returns the name of the server side event method that will be called as provided at construction time.
 RemoteCallData.CallMeasurement getLastClientMeasurement()
          Returns the measurement of the previos RPC.
 java.lang.Object getParameter(int id)
          Retrieves a parameter for a given id.
 void setParameter(int id, java.lang.Object parameter)
          Adds a parameter to this call that is transferred to the server and may be accessed via getParameter there.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data_

protected at.spardat.xma.rpc.RemoteCallData data_
The data actually transferred from client to the server

Constructor Detail

RemoteCall

protected RemoteCall()
Default constructor.

Method Detail

getCallData

public at.spardat.xma.rpc.RemoteCallData getCallData()
Returns the data for package internal use


getEventName

public java.lang.String getEventName()
Returns the name of the server side event method that will be called as provided at construction time.


setParameter

public void setParameter(int id,
                         java.lang.Object parameter)
Adds a parameter to this call that is transferred to the server and may be accessed via getParameter there.

Note that this feature is usually not necessary with XMA since data is automatically transferred via widget models. You should ask yourself seriously if you are doing things right.

Specified by:
setParameter in class RemoteOperation
Parameters:
id - a numeric id of the parameter. Must not be less than zero and greater than 127.
parameter - the parameter data which has to implement java.io.Serializable and must be successfully be serialized. It cannot be null.
Throws:
java.lang.IllegalArgumentException - if any before mentioned condition is violated.

getParameter

public java.lang.Object getParameter(int id)
Retrieves a parameter for a given id.

Specified by:
getParameter in class RemoteOperation
Parameters:
id - the id that has been used in setParameter.
Returns:
the same object set via setParameter or null if there is no parameter with the given id.

execute

public RemoteReply execute()
                    throws at.spardat.enterprise.exc.BaseException
Executes this RemoteCall. The call is made to the server, the server side event method is executed.

Returns:
A RemoteReply object optionally holding parameters you have set at the server side.
Throws:
at.spardat.enterprise.exc.BaseException - all exceptions from the server side event method are packed into BaseExceptions and thrown again here. If the server side event method already throws an BaseException, is is not wrapped in an BaseException again.

getLastClientMeasurement

public RemoteCallData.CallMeasurement getLastClientMeasurement()
Returns the measurement of the previos RPC.