User: juhalindfors
  Date: 01/12/06 16:02:36

  Added:       src/main/org/jboss/mx/interceptor Invocation.java
  Log:
  
  
  Revision  Changes    Path
  1.1                  jmx/src/main/org/jboss/mx/interceptor/Invocation.java
  
  Index: Invocation.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  package org.jboss.mx.interceptor;
  
  import javax.management.Descriptor;
  
  /**
   * Abstraction of the invocation that travels through the interceptor
   * stack.
   *
   * @see org.jboss.mx.interceptor.Interceptor
   *
   * @author  <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
   * @version $Revision: 1.1 $
   *   
   */
  public class Invocation
  {
     // Constants -----------------------------------------------------
     public final static int READ  = 0x1;
     public final static int WRITE = 0x2;
  
     public final static int OPERATION = 0x10;
     public final static int ATTRIBUTE = 0x20;
  
     // Attributes ----------------------------------------------------
     private Object sx;
     private Object tx;
     private int type;
     private int impact;
     private Object[] args;
     private String name;
     private String[] signature;
     private String fullName;
     
     // Constructors --------------------------------------------------
     public Invocation(String name, int type, int impact, Object[] args, String[] 
signature, Descriptor[] descriptors)
     {
        this.name = name;
        this.type = type;
        this.impact = impact;
        this.args = args;
        this.signature = signature;
     }
  
     // Public --------------------------------------------------------
     public Object[] getArgs()
     {
        return args;
     }
  
     public int getInvocationType()
     {
        return type;
     }
  
     public int getImpact()
     {
        return impact;
     }
  
     public String getName()
     {
        return name;
     }
  
     public String getOperationWithSignature()
     {
        if (signature == null)
           return name;
           
        if (fullName != null)
           return fullName;
           
        StringBuffer strBuf = new StringBuffer(1000);
        strBuf.append(name);
        for (int i = 0; i < signature.length; ++i)
           strBuf.append(signature[i]);
           
        fullName = strBuf.toString();
        return fullName;
     }
  }
  
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to