JBoss API: Class MethodInvocation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ejb
Class MethodInvocation

    java.lang.Object
      |
      +--org.jboss.ejb.MethodInvocation

public class MethodInvocation
extends java.lang.Object

MethodInvocation This object carries the method to invoke and an identifier for the target ojbect

Version:
  $Revision: 1.10.6.1 $
Author:
  Rickard Öberg (rickard.oberg@telkel.com), Marc Fleury.
See Also:

Constructor Summary
`MethodInvocation(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args, java.security.Principal identity, java.lang.Object credential, java.lang.Object tpc)` Create a new instance.
`MethodInvocation(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args, javax.transaction.Transaction tx, java.security.Principal identity, java.lang.Object credential)` Create a new instance.

Method Summary
`java.lang.Object[]` | `getArguments()`
`java.lang.Object` | `getCredential()`
`EnterpriseContext` | `getEnterpriseContext()`
`java.lang.Object` | `getId()`
`java.lang.reflect.Method` | `getMethod()`
`java.security.Principal` | `getPrincipal()`
`javax.transaction.Transaction` | `getTransaction()` Return the transaction associated with the method.
`void` | `setCredential(java.lang.Object credential)`
`void` | `setEnterpriseContext(EnterpriseContext ctx)` Set the enterprise context of this invocation.
`void` | `setPrincipal(java.security.Principal identity)`
`void` | `setTransaction(javax.transaction.Transaction tx)` This method sets the transaction associated with the method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MethodInvocation

    public MethodInvocation(java.lang.Object id,
                            java.lang.reflect.Method m,
                            java.lang.Object[] args,
                            javax.transaction.Transaction tx,
                            java.security.Principal identity,
                            java.lang.Object credential)

  Create a new instance.
  Parameters:
    `id` - The id of target EJB of this method invocation.
    `m` - The method to invoke. This method is declared in the remote or home interface of the bean.
    `args` - The arguments for this invocation.
    `tpc` - The transaction propagation context of this invocation.
    `identity` - The security identity to use in this invocation.
    `credential` - The security credentials to use in this invocation.

### MethodInvocation

    public MethodInvocation(java.lang.Object id,
                            java.lang.reflect.Method m,
                            java.lang.Object[] args,
                            java.security.Principal identity,
                            java.lang.Object credential,
                            java.lang.Object tpc)

  Create a new instance.
  Parameters:
    `id` - The id of target EJB of this method invocation.
    `m` - The method to invoke. This method is declared in the remote or home interface of the bean.
    `args` - The arguments for this invocation.
    `identity` - The security identity to use in this invocation.
    `credential` - The security credentials to use in this invocation.
    `tpc` - The transaction propagation context of this invocation.

Method Detail

### getId

    public java.lang.Object getId()

### getMethod

    public java.lang.reflect.Method getMethod()

### getArguments

    public java.lang.Object[] getArguments()

### setTransaction

    public void setTransaction(javax.transaction.Transaction tx)

  This method sets the transaction associated with the method. Note that this doesn't mean that the transaction is associated with the thread. In fact this is the only place it exists until the TxInterceptor logic. Notably it might be the case that the tx associated here is different than the one on the target instance.

### getTransaction

    public javax.transaction.Transaction getTransaction()

  Return the transaction associated with the method. If no transaction is associated with this method but we have a transaction propagation context, import the TPC into the transaction manager, and associate the resulting transaction with this method before returning it.

### setPrincipal

    public void setPrincipal(java.security.Principal identity)

### getPrincipal

    public java.security.Principal getPrincipal()

### setCredential

    public void setCredential(java.lang.Object credential)

### getCredential

    public java.lang.Object getCredential()

### setEnterpriseContext

    public void setEnterpriseContext(EnterpriseContext ctx)

  Set the enterprise context of this invocation. Once a context is associated to a Method Invocation, the MI can pass it all the relevant information. We set Transaction and Principal.

### getEnterpriseContext

    public EnterpriseContext getEnterpriseContext()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.