Java Doc for MarshalledInvocation.java in  » EJB-Server-JBoss-4.2.1 » server » org » jboss » invocation » 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 » server » org.jboss.invocation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.invocation.Invocation
      org.jboss.invocation.MarshalledInvocation

All known Subclasses:   org.jboss.invocation.pooled.interfaces.PooledMarshalledInvocation,
MarshalledInvocation
public class MarshalledInvocation extends Invocation implements java.io.Externalizable(Code)
The MarshalledInvocation is an invocation that travels. As such it serializes its payload because of lack of ClassLoader visibility. As such it contains Marshalled data representing the byte[] of the Invocation object it extends Besides handling the specifics of "marshalling" the payload, which could be done at the Invocation level the Marshalled Invocation can hold optimization and needed code for distribution for example the TransactionPropagationContext which is a serialization of the TX for distribution purposes as well as the "hash" for the methods that we send, as opposed to sending Method objects. Serialization "optimizations" should be coded here in the externalization implementation of the class
author:
   Marc Fleury
author:
   Bill.Burke@jboss.org
author:
   Scott.Stark@jboss.org
author:
   Clebert.Suconic@jboss.org - added pluggable serialization
version:
   $Revision: 57209 $


Field Summary
static  MaphashMap
    
protected transient  ObjectmarshalledArgs
    
protected transient  longmethodHash
    
protected transient  MapmethodMap
    
final static  longserialVersionUID
     Serial Version Identifier.
protected  Objecttpc
    
static  booleanuseFullHashMode
    

Constructor Summary
public  MarshalledInvocation()
    
public  MarshalledInvocation(Invocation invocation)
    
public  MarshalledInvocation(Object id, Method m, Object[] args, Transaction tx, Principal identity, Object credential)
    

Method Summary
public static  longcalculateHash(Method method)
    
public  Object[]getArguments()
    
public static  MapgetFullInterfaceHashes(Class intf)
     Calculate method full hashes.
public static  MapgetInterfaceHashes(Class intf)
     Calculate method hashes.
public  MethodgetMethod()
    
public  longgetMethodHash()
    
public  ObjectgetPayloadValue(Object key)
     A Marshalled invocation has serialized data in the form of MarshalledValue objects.
public  ObjectgetTransactionPropagationContext()
    
static  StringgetTypeString(Class cl)
    
public static  booleangetUseFullHashMode()
     Get the full hash mode flag.
public  ObjectgetValue(Object key)
     A Marshalled invocation has serialized data in the form of MarshalledValue objects.
public static  MapmethodToHashesMap(Class c)
     Calculate method hashes.
public  voidreadExternal(java.io.ObjectInput in)
    
public static  voidremoveHashes(Class declaringClass)
    
public  voidsetMarshalledArguments(IMarshalledValue marshalledValue)
     This is method is used for chaing the MarshalledAruments in a Call-By-Value operation.
public  voidsetMethodHash(long methodHash)
    
public  voidsetMethodMap(Map methods)
    
public  voidsetTransactionPropagationContext(Object tpc)
    
public static  voidsetUseFullHashMode(boolean flag)
     Set the full hash mode flag.
public  voidwriteExternal(java.io.ObjectOutput out)
    

Field Detail
hashMap
static Map hashMap(Code)
WeakHashMap> of declaring class to hashes



marshalledArgs
protected transient Object marshalledArgs(Code)



methodHash
protected transient long methodHash(Code)



methodMap
protected transient Map methodMap(Code)
The Map of methods used by this Invocation



serialVersionUID
final static long serialVersionUID(Code)
Serial Version Identifier.



tpc
protected Object tpc(Code)
The Transaction Propagation Context for distribution



useFullHashMode
static boolean useFullHashMode(Code)
A flag indicating if the full hash format that includes the interface should be used




Constructor Detail
MarshalledInvocation
public MarshalledInvocation()(Code)



MarshalledInvocation
public MarshalledInvocation(Invocation invocation)(Code)



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




Method Detail
calculateHash
public static long calculateHash(Method method)(Code)



getArguments
public Object[] getArguments()(Code)



getFullInterfaceHashes
public static Map getFullInterfaceHashes(Class intf)(Code)
Calculate method full hashes. This algo is taken from RMI with the full method string built from the method toString() which includes the modifiers, return type, declaring class, name, parameters and exceptions.
Parameters:
  intf - - the class/interface to calculate method hashes for. Map mapping of method string to method desc hash



getInterfaceHashes
public static Map getInterfaceHashes(Class intf)(Code)
Calculate method hashes. This algo is taken from RMI with the method string built from the method name + parameters + return type. Note that this is not able to distinguish type compatible methods from different interfaces.
Parameters:
  intf - - the class/interface to calculate method hashes for. Map mapping of method string to method desc hash



getMethod
public Method getMethod()(Code)



getMethodHash
public long getMethodHash()(Code)



getPayloadValue
public Object getPayloadValue(Object key)(Code)
A Marshalled invocation has serialized data in the form of MarshalledValue objects. We overwrite the "getValue" to deserialize the data, this assume that the thread context class loader has visibility on the classes.



getTransactionPropagationContext
public Object getTransactionPropagationContext()(Code)



getTypeString
static String getTypeString(Class cl)(Code)



getUseFullHashMode
public static boolean getUseFullHashMode()(Code)
Get the full hash mode flag. the full hash mode flag.



getValue
public Object getValue(Object key)(Code)
A Marshalled invocation has serialized data in the form of MarshalledValue objects. We overwrite the "getValue" to deserialize the data, this assume that the thread context class loader has visibility on the classes.



methodToHashesMap
public static Map methodToHashesMap(Class c)(Code)
Calculate method hashes. This algo is taken from RMI with the full method string taken from the method.toString to include the declaring class.
Parameters:
  c - the class/interface to calculate method hashes for. Map mapping of method hash to the Method object.



readExternal
public void readExternal(java.io.ObjectInput in) throws IOException, ClassNotFoundException(Code)



removeHashes
public static void removeHashes(Class declaringClass)(Code)
Remove all method hashes for the declaring class
Parameters:
  declaringClass - a class for which a calculateHash(Method) was called



setMarshalledArguments
public void setMarshalledArguments(IMarshalledValue marshalledValue)(Code)
This is method is used for chaing the MarshalledAruments in a Call-By-Value operation.



setMethodHash
public void setMethodHash(long methodHash)(Code)



setMethodMap
public void setMethodMap(Map methods)(Code)



setTransactionPropagationContext
public void setTransactionPropagationContext(Object tpc)(Code)



setUseFullHashMode
public static void setUseFullHashMode(boolean flag)(Code)
Set the full hash mode flag. When true, method hashes are calculated using the getFullInterfaceHashes which is able to differentiate methods by declaring class, return value, name and arg signature, and exceptions. Otherwise, the getInterfaceHashes method uses, and this is only able to differentiate classes by return value, name and arg signature. A useFullHashMode = false is compatible with 3.2.3 and earlier. This needs to be set consistently on the server and the client.
Parameters:
  flag - the full method hash calculation mode flag.



writeExternal
public void writeExternal(java.io.ObjectOutput out) throws IOException(Code)



Fields inherited from org.jboss.invocation.Invocation
final public static String[] INVOKE_SIGNATURE(Code)(Java Doc)
public Object[] args(Code)(Java Doc)
public Map as_is_payload(Code)(Java Doc)
public InvocationContext invocationContext(Code)(Java Doc)
public InvocationType invocationType(Code)(Java Doc)
public Method method(Code)(Java Doc)
public Object objectName(Code)(Java Doc)
public Map payload(Code)(Java Doc)
public Map transient_payload(Code)(Java Doc)

Methods inherited from org.jboss.invocation.Invocation
public Object[] getArguments()(Code)(Java Doc)
public Map getAsIsPayload()(Code)(Java Doc)
public Object getAsIsValue(Object key)(Code)(Java Doc)
public Object getCredential()(Code)(Java Doc)
public Object getEnterpriseContext()(Code)(Java Doc)
public Object getId()(Code)(Java Doc)
public InvocationContext getInvocationContext()(Code)(Java Doc)
public Method getMethod()(Code)(Java Doc)
public Object getObjectName()(Code)(Java Doc)
public Map getPayload()(Code)(Java Doc)
public Object getPayloadValue(Object key)(Code)(Java Doc)
public Principal getPrincipal()(Code)(Java Doc)
public Transaction getTransaction()(Code)(Java Doc)
public Map getTransientPayload()(Code)(Java Doc)
public Object getTransientValue(Object key)(Code)(Java Doc)
public InvocationType getType()(Code)(Java Doc)
public Object getValue(Object key)(Code)(Java Doc)
public boolean isLocal()(Code)(Java Doc)
public Object performCall(Object instance, Method m, Object[] arguments) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, Exception(Code)(Java Doc)
public void setArguments(Object[] arguments)(Code)(Java Doc)
public void setCredential(Object credential)(Code)(Java Doc)
public void setEnterpriseContext(Object ctx)(Code)(Java Doc)
public void setId(Object id)(Code)(Java Doc)
public void setInvocationContext(InvocationContext ctx)(Code)(Java Doc)
public void setMethod(Method method)(Code)(Java Doc)
public void setObjectName(Object objectName)(Code)(Java Doc)
public void setPrincipal(Principal principal)(Code)(Java Doc)
public void setTransaction(Transaction tx)(Code)(Java Doc)
public void setType(InvocationType type)(Code)(Java Doc)
public void setValue(Object key, Object value)(Code)(Java Doc)
public void setValue(Object key, Object value, PayloadKey type)(Code)(Java Doc)

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.