org.jboss.invocation
Class Invocation

java.lang.Object
  extended by org.jboss.invocation.Invocation
Direct Known Subclasses:
LocalEJBInvocation, MarshalledInvocation

public class Invocation
extends 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.

Version:
$Revision: 1.22 $
Author:
Marc Fleury, Christoph G. Jung

Field Summary
 Object[] args
           
 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 invocationContext
           
 InvocationType invocationType
           
static String[] INVOKE_SIGNATURE
          The signature of the invoke() method
 Method method
           
 Object objectName
           
 Map payload
          Payload will be marshalled for type hiding at the RMI layers.
 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(Object id, Method m, Object[] args, Transaction tx, Principal identity, Object credential)
           
 
Method Summary
 Object[] getArguments()
           
 Map getAsIsPayload()
           
 Object getAsIsValue(Object key)
           
 Object getCredential()
           
 Object getEnterpriseContext()
           
 Object getId()
           
 InvocationContext getInvocationContext()
          marcf: SCOTT WARNING! I removed the "setPrincipal" that was called here
 Method getMethod()
          get on method Return the invocation method.
 Object getObjectName()
           
 Map getPayload()
           
 Object getPayloadValue(Object key)
           
 Principal getPrincipal()
           
 Transaction getTransaction()
          get the transaction.
 Map getTransientPayload()
           
 Object getTransientValue(Object key)
           
 InvocationType getType()
           
 Object getValue(Object key)
          Get a value from the stores.
 boolean isLocal()
          Helper method to determine whether an invocation is local
 Object performCall(Object instance, Method m, Object[] arguments)
          This method will be called by the container(ContainerInterceptor) to issue the ultimate method call represented by this invocation.
 void setArguments(Object[] arguments)
          A list of arguments for the method.
 void setCredential(Object credential)
          Change the security credentials of this invocation.
 void setEnterpriseContext(Object ctx)
           
 void setId(Object id)
          Return the invocation target ID.
 void setInvocationContext(InvocationContext ctx)
           
 void setMethod(Method method)
          set on method Return the invocation method.
 void setObjectName(Object objectName)
          container for server side association.
 void setPrincipal(Principal principal)
          Change the security identity of this invocation.
 void setTransaction(Transaction tx)
          set the transaction.
 void setType(InvocationType type)
          An arbitrary type.
 void setValue(Object key, Object value)
          The generic store of variables.
 void setValue(Object key, Object value, PayloadKey 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 String[] INVOKE_SIGNATURE
The signature of the invoke() method


transient_payload

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


as_is_payload

public 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 Map payload
Payload will be marshalled for type hiding at the RMI layers.


invocationContext

public InvocationContext invocationContext

args

public Object[] args

objectName

public Object objectName

method

public Method method

invocationType

public InvocationType invocationType
Constructor Detail

Invocation

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


Invocation

public Invocation(Object id,
                  Method m,
                  Object[] args,
                  Transaction tx,
                  Principal identity,
                  Object credential)
Method Detail

setValue

public void setValue(Object key,
                     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(Object key,
                     Object value,
                     PayloadKey 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 Object getValue(Object key)
Get a value from the stores.


getPayloadValue

public Object getPayloadValue(Object key)

getTransientValue

public Object getTransientValue(Object key)

getAsIsValue

public Object getAsIsValue(Object key)

setTransaction

public void setTransaction(Transaction tx)
set the transaction.


getTransaction

public Transaction getTransaction()
get the transaction.


setPrincipal

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


getPrincipal

public Principal getPrincipal()

setCredential

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


getCredential

public Object getCredential()

setObjectName

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


getObjectName

public Object getObjectName()

setType

public void setType(InvocationType type)
An arbitrary type.


getType

public InvocationType getType()

setId

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


getId

public Object getId()

setMethod

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


getMethod

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


setArguments

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


getArguments

public Object[] getArguments()

getInvocationContext

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


setInvocationContext

public void setInvocationContext(InvocationContext ctx)

setEnterpriseContext

public void setEnterpriseContext(Object ctx)

getEnterpriseContext

public Object getEnterpriseContext()

getTransientPayload

public Map getTransientPayload()

getAsIsPayload

public Map getAsIsPayload()

getPayload

public Map getPayload()

performCall

public Object performCall(Object instance,
                          Method m,
                          Object[] arguments)
                   throws IllegalArgumentException,
                          IllegalAccessException,
                          InvocationTargetException,
                          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:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
Exception

isLocal

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

Returns:
true when local, false otherwise


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.