org.jboss.invocation
Class Invocation

java.lang.Object
  extended byorg.jboss.invocation.Invocation
Direct Known Subclasses:
LocalEJBInvocation (src) , MarshalledInvocation (src)

public class Invocation
extends java.lang.Object

The Invocation object is the generic object flowing through our interceptors.

The heart of it is the payload map that can contain anything we then put readers on them. The first reader is this Invocation object that can interpret the data in it.

Essentially we can carry ANYTHING from the client to the server, we keep a series of of predifined variables and method calls to get at the pointers. But really it is just a repository of objects.


Field Summary
 java.lang.Object[] args
           
 java.util.Map as_is_payload
          as_is classes that will not be marshalled by the invocation (java.* and javax.* or anything in system classpath is OK)
 InvocationContext (src) invocationContext
           
 InvocationType (src) invocationType
           
static java.lang.String[] INVOKE_SIGNATURE
          The signature of the invoke() method
 java.lang.reflect.Method method
           
 java.lang.Object objectName
           
 java.util.Map payload
          Payload will be marshalled for type hiding at the RMI layers.
 java.util.Map transient_payload
          Contextual information to the invocation that is not part of the payload.
 
Constructor Summary
Invocation()
          No-args constructor exposed for externalization only.
Invocation(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args, Transaction (src)  tx, java.security.Principal identity, java.lang.Object credential)
           
 
Method Summary
 java.lang.Object[] getArguments()
           
 java.util.Map getAsIsPayload()
           
 java.lang.Object getAsIsValue(java.lang.Object key)
           
 java.lang.Object getCredential()
           
 java.lang.Object getEnterpriseContext()
           
 java.lang.Object getId()
           
 InvocationContext (src) getInvocationContext()
          marcf: SCOTT WARNING! I removed the "setPrincipal" that was called here
 java.lang.reflect.Method getMethod()
          get on method Return the invocation method.
 java.lang.Object getObjectName()
           
 java.util.Map getPayload()
           
 java.lang.Object getPayloadValue(java.lang.Object key)
           
 java.security.Principal getPrincipal()
           
 Transaction (src) getTransaction()
          get the transaction.
 java.util.Map getTransientPayload()
           
 java.lang.Object getTransientValue(java.lang.Object key)
           
 InvocationType (src) getType()
           
 java.lang.Object getValue(java.lang.Object key)
          Get a value from the stores.
 boolean isLocal()
          Helper method to determine whether an invocation is local
 java.lang.Object performCall(java.lang.Object instance, java.lang.reflect.Method m, java.lang.Object[] arguments)
          This method will be called by the container(ContainerInterceptor) to issue the ultimate method call represented by this invocation.
 void setArguments(java.lang.Object[] arguments)
          A list of arguments for the method.
 void setCredential(java.lang.Object credential)
          Change the security credentials of this invocation.
 void setEnterpriseContext(java.lang.Object ctx)
           
 void setId(java.lang.Object id)
          Return the invocation target ID.
 void setInvocationContext(InvocationContext (src)  ctx)
           
 void setMethod(java.lang.reflect.Method method)
          set on method Return the invocation method.
 void setObjectName(java.lang.Object objectName)
          container for server side association.
 void setPrincipal(java.security.Principal principal)
          Change the security identity of this invocation.
 void setTransaction(Transaction (src)  tx)
          set the transaction.
 void setType(InvocationType (src)  type)
          An arbitrary type.
 void setValue(java.lang.Object key, java.lang.Object value)
          The generic store of variables.
 void setValue(java.lang.Object key, java.lang.Object value, PayloadKey (src)  type)
          Advanced store Here you can pass a TYPE that indicates where to put the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVOKE_SIGNATURE

public static final java.lang.String[] INVOKE_SIGNATURE
The signature of the invoke() method


transient_payload

public java.util.Map transient_payload
Contextual information to the invocation that is not part of the payload.


as_is_payload

public java.util.Map as_is_payload
as_is classes that will not be marshalled by the invocation (java.* and javax.* or anything in system classpath is OK)


payload

public java.util.Map payload
Payload will be marshalled for type hiding at the RMI layers.


invocationContext

public InvocationContext (src)  invocationContext

args

public java.lang.Object[] args

objectName

public java.lang.Object objectName

method

public java.lang.reflect.Method method

invocationType

public InvocationType (src)  invocationType
Constructor Detail

Invocation

public Invocation()
No-args constructor exposed for externalization only.


Invocation

public Invocation(java.lang.Object id,
                  java.lang.reflect.Method m,
                  java.lang.Object[] args,
                  Transaction (src)  tx,
                  java.security.Principal identity,
                  java.lang.Object credential)
Method Detail

setValue

public void setValue(java.lang.Object key,
                     java.lang.Object value)
The generic store of variables.

The generic getter and setter is really all that one needs to talk to this object. We introduce typed getters and setters for convenience and code readability in the codeba


setValue

public void setValue(java.lang.Object key,
                     java.lang.Object value,
                     PayloadKey (src)  type)
Advanced store Here you can pass a TYPE that indicates where to put the value. TRANSIENT: the value is put in a map that WON'T be passed AS_IS: no need to marshall the value when passed (use for all JDK java types) PAYLOAD: we need to marshall the value as its type is application specific


getValue

public java.lang.Object getValue(java.lang.Object key)
Get a value from the stores.


getPayloadValue

public java.lang.Object getPayloadValue(java.lang.Object key)

getTransientValue

public java.lang.Object getTransientValue(java.lang.Object key)

getAsIsValue

public java.lang.Object getAsIsValue(java.lang.Object key)

setTransaction

public void setTransaction(Transaction (src)  tx)
set the transaction.


getTransaction

public Transaction (src)  getTransaction()
get the transaction.


setPrincipal

public void setPrincipal(java.security.Principal principal)
Change the security identity of this invocation.


getPrincipal

public java.security.Principal getPrincipal()

setCredential

public void setCredential(java.lang.Object credential)
Change the security credentials of this invocation.


getCredential

public java.lang.Object getCredential()

setObjectName

public void setObjectName(java.lang.Object objectName)
container for server side association.


getObjectName

public java.lang.Object getObjectName()

setType

public void setType(InvocationType (src)  type)
An arbitrary type.


getType

public InvocationType (src)  getType()

setId

public void setId(java.lang.Object id)
Return the invocation target ID. Can be used to identify a cached object


getId

public java.lang.Object getId()

setMethod

public void setMethod(java.lang.reflect.Method method)
set on method Return the invocation method.


getMethod

public java.lang.reflect.Method getMethod()
get on method Return the invocation method.


setArguments

public void setArguments(java.lang.Object[] arguments)
A list of arguments for the method.


getArguments

public java.lang.Object[] getArguments()

getInvocationContext

public InvocationContext (src)  getInvocationContext()
marcf: SCOTT WARNING! I removed the "setPrincipal" that was called here


setInvocationContext

public void setInvocationContext(InvocationContext (src)  ctx)

setEnterpriseContext

public void setEnterpriseContext(java.lang.Object ctx)

getEnterpriseContext

public java.lang.Object getEnterpriseContext()

getTransientPayload

public java.util.Map getTransientPayload()

getAsIsPayload

public java.util.Map getAsIsPayload()

getPayload

public java.util.Map getPayload()

performCall

public java.lang.Object performCall(java.lang.Object instance,
                                    java.lang.reflect.Method m,
                                    java.lang.Object[] arguments)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException,
                                    java.lang.Exception
This method will be called by the container(ContainerInterceptor) to issue the ultimate method call represented by this invocation. It is overwritten, e.g., by the WS4EE invocation in order to realize JAXRPC pre- and postprocessing.

Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.Exception

isLocal

public boolean isLocal()
Helper method to determine whether an invocation is local

Returns:
true when local, false otherwise