org.openejb.server.ejbd
Class EJBInvocationStream

java.lang.Object
  extended byorg.openejb.client.EJBRequest
      extended byorg.openejb.server.ejbd.EJBInvocationStream
All Implemented Interfaces:
EJBInvocation, Externalizable, org.apache.geronimo.core.service.Invocation, Request, RequestMethods, Serializable

public class EJBInvocationStream
extends EJBRequest
implements EJBInvocation

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openejb.client.EJBRequest
ENTITY_BM_PERSISTENCE, ENTITY_CM_PERSISTENCE, SESSION_BEAN_STATEFUL, SESSION_BEAN_STATELESS
 
Fields inherited from interface org.openejb.client.RequestMethods
AUTH_REQUEST, EJB_HOME_CREATE, EJB_HOME_FIND, EJB_HOME_GET_EJB_META_DATA, EJB_HOME_GET_HOME_HANDLE, EJB_HOME_METHOD, EJB_HOME_REMOVE_BY_HANDLE, EJB_HOME_REMOVE_BY_PKEY, EJB_OBJECT_BUSINESS_METHOD, EJB_OBJECT_GET_EJB_HOME, EJB_OBJECT_GET_HANDLE, EJB_OBJECT_GET_PRIMARY_KEY, EJB_OBJECT_IS_IDENTICAL, EJB_OBJECT_REMOVE, EJB_REQUEST, JNDI_APP_CTX_PULL, JNDI_LIST, JNDI_LIST_BINDINGS, JNDI_LOOKUP, JNDI_REQUEST, STOP_REQUEST_quit, STOP_REQUEST_Quit, STOP_REQUEST_stop, STOP_REQUEST_Stop
 
Constructor Summary
EJBInvocationStream()
           
EJBInvocationStream(int requestMethod)
           
EJBInvocationStream(ORBRef orbRef)
           
 
Method Summary
 org.apache.geronimo.core.service.InvocationResult createExceptionResult(Exception exception)
           
 org.apache.geronimo.core.service.InvocationResult createResult(Object object)
           
 Object get(org.apache.geronimo.core.service.InvocationKey arg0)
           
 Object[] getArguments()
          Any arguments to the invocation (e.g.
 EJBInstanceContext getEJBInstanceContext()
          The context representing the actual instance to use for processing this request.
 Object getId()
          The identity of the instance being invoked; for example, the primary key of an Entity EJB.
 Class getMethodClass()
           
 int getMethodIndex()
          The index of the virtual EJB operation
 Method getMethodInstance()
           
 String getMethodName()
           
 Object[] getMethodParameters()
           
 Class[] getMethodParamTypes()
           
 Object getPrimaryKey()
           
 org.apache.geronimo.transaction.context.TransactionContext getTransactionContext()
          Gets the transaction context to use.
 EJBInterfaceType getType()
          The type of invocation, indicating which interface was invoked or which 'special' callback was should be invoked (e.g.
 void put(org.apache.geronimo.core.service.InvocationKey arg0, Object arg1)
           
 void readExternal(ObjectInput in)
          The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
 void setEJBInstanceContext(EJBInstanceContext instanceContext)
          Set the instance context to use
 void setMethodIndex(int methodIndex)
           
 void setTransactionContext(org.apache.geronimo.transaction.context.TransactionContext transactionContext)
          Setx the transaction context to use.
 
Methods inherited from class org.openejb.client.EJBRequest
clearState, getClientIdentity, getContainerCode, getContainerID, getRequestMethod, getRequestType, loadMethodInstance, readClientIdentity, readContainerId, readMethod, readMethodParameters, readPrimaryKey, readRequestMethod, setClientIdentity, setContainerCode, setContainerID, setMethodInstance, setMethodParameters, setPrimaryKey, setRequestMethod, toString, writeExternal, writeMethodParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EJBInvocationStream

public EJBInvocationStream()

EJBInvocationStream

public EJBInvocationStream(ORBRef orbRef)

EJBInvocationStream

public EJBInvocationStream(int requestMethod)
Method Detail

getArguments

public Object[] getArguments()
Description copied from interface: EJBInvocation
Any arguments to the invocation (e.g. Method parameters).

Specified by:
getArguments in interface EJBInvocation
Returns:
the arguments to the invocation; null indicates no arguments (equivalent to Object[0])

getId

public Object getId()
Description copied from interface: EJBInvocation
The identity of the instance being invoked; for example, the primary key of an Entity EJB.

Specified by:
getId in interface EJBInvocation
Returns:
the identity of the instance to invoke; may be null for 'class' level operations

getMethodIndex

public int getMethodIndex()
Description copied from interface: EJBInvocation
The index of the virtual EJB operation

Specified by:
getMethodIndex in interface EJBInvocation
Returns:
the index of the EJB operation being performed

getType

public EJBInterfaceType getType()
Description copied from interface: EJBInvocation
The type of invocation, indicating which interface was invoked or which 'special' callback was should be invoked (e.g. ejbTimeout).

Specified by:
getType in interface EJBInvocation
Returns:
the type of invocation

getMethodClass

public Class getMethodClass()
Overrides:
getMethodClass in class EJBRequest

getMethodInstance

public Method getMethodInstance()
Overrides:
getMethodInstance in class EJBRequest

getMethodName

public String getMethodName()
Overrides:
getMethodName in class EJBRequest

getMethodParameters

public Object[] getMethodParameters()
Overrides:
getMethodParameters in class EJBRequest

getMethodParamTypes

public Class[] getMethodParamTypes()
Overrides:
getMethodParamTypes in class EJBRequest

getPrimaryKey

public Object getPrimaryKey()
Overrides:
getPrimaryKey in class EJBRequest

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Description copied from class: EJBRequest
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Specified by:
readExternal in interface Request
Overrides:
readExternal in class EJBRequest
Parameters:
in - the stream to read data from in order to restore the object
Throws:
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored cannot be found.

get

public Object get(org.apache.geronimo.core.service.InvocationKey arg0)
Specified by:
get in interface org.apache.geronimo.core.service.Invocation

put

public void put(org.apache.geronimo.core.service.InvocationKey arg0,
                Object arg1)
Specified by:
put in interface org.apache.geronimo.core.service.Invocation

setEJBInstanceContext

public void setEJBInstanceContext(EJBInstanceContext instanceContext)
Description copied from interface: EJBInvocation
Set the instance context to use

Specified by:
setEJBInstanceContext in interface EJBInvocation
Parameters:
instanceContext - the instance context to use

setTransactionContext

public void setTransactionContext(org.apache.geronimo.transaction.context.TransactionContext transactionContext)
Description copied from interface: EJBInvocation
Setx the transaction context to use. Eventhough the tx context is available from a thread local we carry it in the invocation context to avoid the extra tx cost.

Specified by:
setTransactionContext in interface EJBInvocation
Parameters:
transactionContext - the transaction context to use

getEJBInstanceContext

public EJBInstanceContext getEJBInstanceContext()
Description copied from interface: EJBInvocation
The context representing the actual instance to use for processing this request. Is transient, not valid on the client side, and will not be valid on the server side until a suitable instance has been located by an Interceptor

Specified by:
getEJBInstanceContext in interface EJBInvocation
Returns:
the context representing the instance to invoke

getTransactionContext

public org.apache.geronimo.transaction.context.TransactionContext getTransactionContext()
Description copied from interface: EJBInvocation
Gets the transaction context to use. Eventhough the tx context is available from a thread local we carry it in the invocation context to avoid the extra tx cost.

Specified by:
getTransactionContext in interface EJBInvocation
Returns:
the transaction context to use

setMethodIndex

public void setMethodIndex(int methodIndex)

createResult

public org.apache.geronimo.core.service.InvocationResult createResult(Object object)
Specified by:
createResult in interface EJBInvocation

createExceptionResult

public org.apache.geronimo.core.service.InvocationResult createExceptionResult(Exception exception)
Specified by:
createExceptionResult in interface EJBInvocation


Copyright © 1999-2006 OpenEJB. All Rights Reserved.