Java Doc for OptimizedMBeanDispatcher.java in  » EJB-Server-JBoss-4.2.1 » jmx » org » jboss » mx » capability » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » jmx » org.jboss.mx.capability 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.mx.capability.OptimizedMBeanDispatcher

OptimizedMBeanDispatcher
public class OptimizedMBeanDispatcher implements ServerConstants(Code)
Byte code optimized dispatcher for Standard MBeans. This dispatcher generates an invoke implementation that handles the operation dispatching without Java reflection.

The use of this dispatcher may be controlled by setting a org.jboss.mx.server.ServerConstants.OPTIMIZE_REFLECTED_DISPATCHER OPTIMIZE_REFLECTED_DISPATCHER property to either "true" or "false" string value.
See Also:   org.jboss.mx.capability.ReflectedMBeanDispatcher
See Also:   org.jboss.mx.capability.DispatchClassLoader
author:
   Juha Lindfors.
version:
   $Revision: 57200 $



Field Summary
final static  ClassSUPER_CLASS
    


Method Summary
protected static  InstructionListconvertObjectToPrimitive(ConstantPoolGen cp, String type)
     Converts a reference of a primitve wrapper object into a primite value type. This method assumes that the wrapper object reference is already loaded at the top of the operand stack.
protected static  InstructionListconvertPrimitiveToObject(ConstantPoolGen cp, String type)
     Converts a primitive into its corresponding object wrapper reference. This method assumes the primitve is already pushed to the top of the operand stack.
public static  ReflectedMBeanDispatchercreate(MBeanInfo info, Object resource)
    
protected static  MethodGencreateConstructor(ConstantPoolGen cp, String className)
    
protected static  MethodGencreateInvoke(ConstantPoolGen cp, MBeanInfo info, String className, String resourceClassName)
     Creates the implementation of the invoke(String actionName, Object[] args, String[] signature) method.
public static  StringgetDescriptorForType(String name)
     Returns a descriptor for a given Java type.
public static  StringgetMethodDescriptor(MBeanParameterInfo[] signature, String returnType)
     Returns the signature of a MBean operation using the grammar required by the class file format, excluding the method name.
protected static  MethodEntry[]getOperations(MBeanInfo info)
     Returns a subset of MBean's operations.
public static  booleanisPrimitive(String name)
     Checks if a given name matches the TYPE name of a primitive wrapper class.

Field Detail
SUPER_CLASS
final static Class SUPER_CLASS(Code)





Method Detail
convertObjectToPrimitive
protected static InstructionList convertObjectToPrimitive(ConstantPoolGen cp, String type)(Code)
Converts a reference of a primitve wrapper object into a primite value type. This method assumes that the wrapper object reference is already loaded at the top of the operand stack. The stack is modified so that the object reference to a primitive wrapper is replaced by the corresponding value in the stack.
Parameters:
  cp - constant pool
Parameters:
  type - class name of the primitive wrapper object to convert an instruction list that replaces an object reference of a primitivewrapper object to its corresponding value in the operand stack



convertPrimitiveToObject
protected static InstructionList convertPrimitiveToObject(ConstantPoolGen cp, String type)(Code)
Converts a primitive into its corresponding object wrapper reference. This method assumes the primitve is already pushed to the top of the operand stack. The stack is modified so that the primitive value is replaced by a reference to its corresponding wrapper object that has been initialized to contain the same value.
Parameters:
  cp - constant pool
Parameters:
  type - type string of the primitive, for example java.lang.Integer.TYPE Integer.TYPE.getName() an instruction list that replaces the primitive type at the top ofthe operand stack with its corresponding, initialized, wrapper object



create
public static ReflectedMBeanDispatcher create(MBeanInfo info, Object resource)(Code)



createConstructor
protected static MethodGen createConstructor(ConstantPoolGen cp, String className)(Code)
creates constructor <init>(MBeanInfo info, AttributeOperationResolver resolver, Object resource) that calls super(info, resolver, resource) in its implementation
Parameters:
  cp - constant pool
Parameters:
  className - name of the class being generated



createInvoke
protected static MethodGen createInvoke(ConstantPoolGen cp, MBeanInfo info, String className, String resourceClassName)(Code)
Creates the implementation of the invoke(String actionName, Object[] args, String[] signature) method. This implementation currently handles all non overloaded MBean operation invocations. Overloaded operations still fall back to the default reflected invocations.

The Java equivalent of the implementation looks roughly as follows:

 public void invoke(String actionName, Object[] args, String[] signature)
 {
 if (actionName != null)
 {
 try
 {
 if (actionName.equals(<operName1>))
 return ((<resource type>)super.getResourceObject()).<operName1>((<arg1 type>)arg1, (<arg2 type>)arg2, ...);
 else if (actionName.equals(<operName2>))
 return ((<resource type>)super.getResourceObject()).<operName2>((<arg1 type>)arg1, (<arg2 type>)arg2, ...);
 ...
 else
 super.invoke(actionName, args, signature);
 }
 catch (Throwable t)
 {
 super.invoke(actionName, args, signature);
 }
 }
 }
 

Parameters:
  cp - constant pool of the class being generated
Parameters:
  info - metadata of the MBean
Parameters:
  className - name of the class being generated
Parameters:
  resourceClassName - name of the resource class being invoked



getDescriptorForType
public static String getDescriptorForType(String name)(Code)
Returns a descriptor for a given Java type. See java.lang.Class.getName Class.getName() for details on the grammar for arrays and primitive types. Note that the internal form of the fully qualified name for class Object is used, so for example, the returned descriptor for java.lang.Object is
Ljava/lang/Object;
See JVM spec �4.2 and �4.3 for detailed description of the internal class name format and grammar notation.
Parameters:
  name - fully qualified name of the Java type descriptor string using the JVM grammar



getMethodDescriptor
public static String getMethodDescriptor(MBeanParameterInfo[] signature, String returnType)(Code)
Returns the signature of a MBean operation using the grammar required by the class file format, excluding the method name.

The Java Virtual Machine Specification: 4.3.3 Method Descriptors

A method descriptor represents the parameters that the method takes and the value that it returns:
 MethodDescriptor:
 ( ParameterDescriptor* ) ReturnDescriptor
 
A parameter descriptor represents a parameter passed to a method:
 ParameterDescriptor:
 FieldType
 
A return descriptor represents the type of the value returned from a method. It is a series of characters generated by the grammar:
 ReturnDescriptor:
 FieldType
 V
 
The character V indicates that the method returns no value (its return type is void).

For example, the method descriptor for the method

  Object mymethod(int i, double d, Thread t)  
is
  (IDLjava/lang/Thread;)Ljava/lang/Object;  
Note that internal forms of the fully qualified names of Thread and Object are used in the method descriptor.



getOperations
protected static MethodEntry[] getOperations(MBeanInfo info)(Code)
Returns a subset of MBean's operations. Overloaded operations are not supported yet, so they're left out of the list and their invocations are delegated to the reflection based super class.

Overloaded operations that differ in their arg list length may be able to gain in performance if implemented directly with byte code. Overloaded operations with equal arg list length may not show much difference compared to ternary search tree based resolver.




isPrimitive
public static boolean isPrimitive(String name)(Code)
Checks if a given name matches the TYPE name of a primitive wrapper class.
See Also:   java.lang.Integer.TYPE
Parameters:
  name - TYPE.getName() true if is a primitive type name; false otherwise



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.