Java Doc for OperationContext.java in  » Web-Services-AXIS2 » kernal » org » apache » axis2 » context » 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 » Web Services AXIS2 » kernal » org.apache.axis2.context 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.axis2.context.AbstractContext
      org.apache.axis2.context.OperationContext

OperationContext
public class OperationContext extends AbstractContext implements Externalizable(Code)
An OperationContext represents a running "instance" of an operation, which is represented by an AxisOperation object. This concept is needed to allow messages to be grouped into operations as in WSDL 2.0-speak operations are essentially arbitrary message exchange patterns. So as messages are being exchanged the OperationContext remembers the state of where in the message exchange pattern it is in.

The base implementation of OperationContext supports MEPs which have one input message and/or one output message. That is, it supports the all the MEPs that are in the WSDL 2.0 specification. In order to support another MEP one must extend this class and register its creation in the OperationContexFactory.




Constructor Summary
public  OperationContext()
    
public  OperationContext(AxisOperation axisOperation, ServiceContext serviceContext)
     Constructs a new OperationContext.

Method Summary
public  voidactivate(ConfigurationContext cc)
     This method checks to see if additional work needs to be done in order to complete the object reconstitution. Some parts of the object restored from the readExternal() cannot be completed until we have a configurationContext from the active engine.
public  voidaddMessageContext(MessageContext msgContext)
     When a new message is added to the MEPContext the logic should be included remove the MEPContext from the table in the EngineContext.
public  voidcleanup()
     Removes the pointers to this OperationContext in the ConfigurationContext's OperationContextMap so that this OperationContext will eventually get garbage collected along with the MessageContext's it contains.
public  AxisOperationgetAxisOperation()
    
public  ConfigurationContextgetConfigurationContext()
     Returns the EngineContext in which the parent ServiceContext lives.
public  StringgetLogCorrelationIDString()
     Get the ID associated with this object instance. A string that can be output to a log file as an identifierfor this object instance.
public  MessageContextgetMessageContext(String messageLabel)
    
public  HashMapgetMessageContexts()
    
public  StringgetOperationName()
     Get the name associated with the operation.
public  ConfigurationContextgetRootContext()
    
public  ServiceContextgetServiceContext()
     Returns the ServiceContext in which this OperationContext lives.
public  StringgetServiceGroupName()
     Get the name associated with the service group.
public  StringgetServiceName()
     Get the name associated with the service.
public  booleanisComplete()
     Checks to see if the MEP is complete.
public  booleanisEquivalent(OperationContext ctx)
     Compares key parts of the state from the current instance of this class with the specified instance to see if they are equivalent.
public  voidisolateMessageContext(MessageContext mc)
     Isolate the specified message context object to prepare for serialization.
public  voidreadExternal(ObjectInput in)
     Restore the contents of the object that was previously saved.

NOTE: The field data must read back in the same order and type as it was written.

public  voidrestoreMessageContext(MessageContext msg)
     Restore the specified MessageContext object in the table used to hold the message contexts associated with this operation.
public  voidsetComplete(boolean complete)
    
public  voidsetKey(String key)
    
public  voidwriteExternal(ObjectOutput out)
     Save the contents of this object.


Constructor Detail
OperationContext
public OperationContext()(Code)
Simple constructor (needed for deserialization, shouldn't be used otherwise!)



OperationContext
public OperationContext(AxisOperation axisOperation, ServiceContext serviceContext)(Code)
Constructs a new OperationContext.
Parameters:
  axisOperation - the AxisOperation whose running instances' state thisOperationContext represents.
Parameters:
  serviceContext - the parent ServiceContext representing any state related tothe set of all operations of the service.




Method Detail
activate
public void activate(ConfigurationContext cc)(Code)
This method checks to see if additional work needs to be done in order to complete the object reconstitution. Some parts of the object restored from the readExternal() cannot be completed until we have a configurationContext from the active engine. The configurationContext is used to help this object to plug back into the engine's configuration and deployment objects.
Parameters:
  cc - The configuration context object representing the active configuration



addMessageContext
public void addMessageContext(MessageContext msgContext) throws AxisFault(Code)
When a new message is added to the MEPContext the logic should be included remove the MEPContext from the table in the EngineContext. Example: IN_IN_OUT At the second IN message the MEPContext should be removed from the AxisOperation.
Parameters:
  msgContext -



cleanup
public void cleanup()(Code)
Removes the pointers to this OperationContext in the ConfigurationContext's OperationContextMap so that this OperationContext will eventually get garbage collected along with the MessageContext's it contains. Note that if the caller wants to make sure its safe to clean up this OperationContext he should call isComplete() first. However, in cases like IN_OPTIONAL_OUT and OUT_OPTIONAL_IN, it is possibe this will get called without the MEP being complete due to the optional nature of the MEP.



getAxisOperation
public AxisOperation getAxisOperation()(Code)
Returns the axisOperation.



getConfigurationContext
public ConfigurationContext getConfigurationContext()(Code)
Returns the EngineContext in which the parent ServiceContext lives. Returns parent ServiceContext's parent EngineContext.



getLogCorrelationIDString
public String getLogCorrelationIDString()(Code)
Get the ID associated with this object instance. A string that can be output to a log file as an identifierfor this object instance. It is suitable for matching related logentries.



getMessageContext
public MessageContext getMessageContext(String messageLabel) throws AxisFault(Code)

Parameters:
  messageLabel - Returns MessageContext.
throws:
  AxisFault -



getMessageContexts
public HashMap getMessageContexts()(Code)



getOperationName
public String getOperationName()(Code)
Get the name associated with the operation. The name String



getRootContext
public ConfigurationContext getRootContext()(Code)



getServiceContext
public ServiceContext getServiceContext()(Code)
Returns the ServiceContext in which this OperationContext lives. Returns parent ServiceContext.



getServiceGroupName
public String getServiceGroupName()(Code)
Get the name associated with the service group. The name String



getServiceName
public String getServiceName()(Code)
Get the name associated with the service. The name String



isComplete
public boolean isComplete()(Code)
Checks to see if the MEP is complete. i.e. whether all the messages that are associated with the MEP has arrived and MEP is complete.



isEquivalent
public boolean isEquivalent(OperationContext ctx)(Code)
Compares key parts of the state from the current instance of this class with the specified instance to see if they are equivalent.

This differs from the java.lang.Object.equals() method in that the equals() method generally looks at both the object identity (location in memory) and the object state (data).


Parameters:
  ctx - The object to compare with TRUE if this object is equivalent with the specified objectthat is, key fields matchFALSE, otherwise




isolateMessageContext
public void isolateMessageContext(MessageContext mc)(Code)
Isolate the specified message context object to prepare for serialization. Instead of saving the entire message context object, just setup some metadata about the message context.

Note: this will remove the specified message context object from the message context table.
Parameters:
  mc - The message context object




readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Restore the contents of the object that was previously saved.

NOTE: The field data must read back in the same order and type as it was written. Some data will need to be validated when resurrected.
Parameters:
  in - The stream to read the object contents from
throws:
  IOException -
throws:
  ClassNotFoundException -




restoreMessageContext
public void restoreMessageContext(MessageContext msg)(Code)
Restore the specified MessageContext object in the table used to hold the message contexts associated with this operation.
Parameters:
  msg - The message context object



setComplete
public void setComplete(boolean complete)(Code)



setKey
public void setKey(String key)(Code)



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Save the contents of this object.

NOTE: Transient fields and static fields are not saved. Also, objects that represent "static" data are not saved, except for enough information to be able to find matching objects when the message context is re-constituted.
Parameters:
  out - The stream to write the object contents to
throws:
  IOException -




Fields inherited from org.apache.axis2.context.AbstractContext
final public static String COPY_PROPERTIES(Code)(Java Doc)
protected long lastTouchedTime(Code)(Java Doc)
protected transient AbstractContext parent(Code)(Java Doc)
protected transient Map properties(Code)(Java Doc)

Methods inherited from org.apache.axis2.context.AbstractContext
public synchronized void clearPropertyDifferences()(Code)(Java Doc)
public void flush() throws AxisFault(Code)(Java Doc)
public long getLastTouchedTime()(Code)(Java Doc)
public AbstractContext getParent()(Code)(Java Doc)
public Map getProperties()(Code)(Java Doc)
public Object getProperty(String key)(Code)(Java Doc)
public synchronized Map getPropertyDifferences()(Code)(Java Doc)
public Iterator getPropertyNames()(Code)(Java Doc)
public Object getPropertyNonReplicable(String key)(Code)(Java Doc)
abstract public ConfigurationContext getRootContext()(Code)(Java Doc)
public void mergeProperties(Map props)(Code)(Java Doc)
public synchronized void removeProperty(String key)(Code)(Java Doc)
public synchronized void removePropertyNonReplicable(String key)(Code)(Java Doc)
public void setLastTouchedTime(long t)(Code)(Java Doc)
public void setNonReplicableProperty(String key, Object value)(Code)(Java Doc)
public void setParent(AbstractContext context)(Code)(Java Doc)
public void setProperties(Map properties)(Code)(Java Doc)
public void setProperty(String key, Object value)(Code)(Java Doc)
protected void touch()(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.