org.objectweb.easybeans.rpc
Class JEJBRequest

java.lang.Object
  extended by org.objectweb.easybeans.rpc.JEJBRequest
All Implemented Interfaces:
java.io.Serializable, EJBRequest

public class JEJBRequest
extends java.lang.Object
implements EJBRequest

Implementation of the EJBRequest interface.

Author:
Florent Benoit
See Also:
Serialized Form

Field Summary
private  java.lang.Object[] args
          Arguments of the method (not serializable).
private  java.lang.Long beanId
          Id of the bean (ie, for stateful).
private  byte[] byteArgs
          Arguments of the method.
private  java.lang.String containerId
          Id of the container that will be used on the remote side.
private  java.lang.String factoryName
          Name of the factory for which is dedicated this request.
private  long methodHash
          Hashing of the method.
private  java.lang.String methodName
          Name of the method.
private static long serialVersionUID
          Id for serializable class.
 
Constructor Summary
JEJBRequest(java.lang.String methodName, long methodHash, java.lang.Object[] args, java.lang.String containerId, java.lang.String factoryName, java.lang.Long beanId)
          Builds a new request that will be sent on remote side.
 
Method Summary
 java.lang.Long getBeanId()
           
 java.lang.String getContainerId()
           
 java.lang.String getFactory()
           
 java.lang.Object[] getMethodArgs()
           
 long getMethodHash()
           
 java.lang.String getMethodName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Id for serializable class.

See Also:
Constant Field Values

methodName

private java.lang.String methodName
Name of the method.


methodHash

private long methodHash
Hashing of the method.

See Also:
Method hashing of RMI

byteArgs

private byte[] byteArgs
Arguments of the method.


args

private transient java.lang.Object[] args
Arguments of the method (not serializable).


containerId

private java.lang.String containerId
Id of the container that will be used on the remote side.


factoryName

private java.lang.String factoryName
Name of the factory for which is dedicated this request.


beanId

private java.lang.Long beanId
Id of the bean (ie, for stateful).

Constructor Detail

JEJBRequest

public JEJBRequest(java.lang.String methodName,
                   long methodHash,
                   java.lang.Object[] args,
                   java.lang.String containerId,
                   java.lang.String factoryName,
                   java.lang.Long beanId)
            throws RPCException
Builds a new request that will be sent on remote side.

Parameters:
methodName - the name of the method.
methodHash - the hash of the method.
args - the arguments of the method.
containerId - id of the remote container.
factoryName - the name of the remote factory.
beanId - the bean identifier.
Throws:
RPCException - if the request cannot be built.
Method Detail

getMethodName

public java.lang.String getMethodName()
Specified by:
getMethodName in interface EJBRequest
Returns:
name of the method

getMethodHash

public long getMethodHash()
Specified by:
getMethodHash in interface EJBRequest
Returns:
the hash of this method
See Also:
Method hashing of RMI

getMethodArgs

public java.lang.Object[] getMethodArgs()
                                 throws java.lang.IllegalStateException
Specified by:
getMethodArgs in interface EJBRequest
Returns:
the argument of the request (send by the client).
Throws:
java.lang.IllegalStateException - if arguments were serialized and not available.

getContainerId

public java.lang.String getContainerId()
Specified by:
getContainerId in interface EJBRequest
Returns:
the container id of this request. It will be used to know the container for which this request is sent.

getFactory

public java.lang.String getFactory()
Specified by:
getFactory in interface EJBRequest
Returns:
the factory name of the container.

getBeanId

public java.lang.Long getBeanId()
Specified by:
getBeanId in interface EJBRequest
Returns:
the id of the bean.