org.openejb
Class EJBInvocationImpl

java.lang.Object
  extended byorg.apache.geronimo.core.service.SimpleInvocation
      extended byorg.openejb.EJBInvocationImpl
All Implemented Interfaces:
EJBInvocation, Externalizable, org.apache.geronimo.core.service.Invocation, Serializable
Direct Known Subclasses:
EJBInvocationImplRemote

public class EJBInvocationImpl
extends org.apache.geronimo.core.service.SimpleInvocation
implements EJBInvocation

Version:
$Revision: 445478 $ $Date: 2005-06-21 23:16:59 +0200 (Tue, 21 Jun 2005) $
See Also:
Serialized Form

Constructor Summary
EJBInvocationImpl()
          No-arg constructor needed for Externalizable
EJBInvocationImpl(EJBInterfaceType type, int index, Object[] arguments)
           
EJBInvocationImpl(EJBInterfaceType type, Object id, int index, Object[] arguments)
           
EJBInvocationImpl(int index, Object[] arguments, EJBInstanceContext instanceContext)
           
 
Method Summary
 org.apache.geronimo.core.service.InvocationResult createExceptionResult(Exception exception)
           
 org.apache.geronimo.core.service.InvocationResult createResult(Object object)
           
 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.
 int getMethodIndex()
          The index of the virtual EJB operation
 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 readExternal(ObjectInput in)
           
 void setEJBInstanceContext(EJBInstanceContext instanceContext)
          Set the instance context to use
 void setTransactionContext(org.apache.geronimo.transaction.context.TransactionContext transactionContext)
          Setx the transaction context to use.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.apache.geronimo.core.service.SimpleInvocation
get, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.geronimo.core.service.Invocation
get, put
 

Constructor Detail

EJBInvocationImpl

public EJBInvocationImpl()
No-arg constructor needed for Externalizable


EJBInvocationImpl

public EJBInvocationImpl(EJBInterfaceType type,
                         int index,
                         Object[] arguments)

EJBInvocationImpl

public EJBInvocationImpl(EJBInterfaceType type,
                         Object id,
                         int index,
                         Object[] arguments)

EJBInvocationImpl

public EJBInvocationImpl(int index,
                         Object[] arguments,
                         EJBInstanceContext instanceContext)
Method Detail

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

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

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

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

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

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

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

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 1999-2006 OpenEJB. All Rights Reserved.