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


java.lang.Object
   org.apache.axis2.client.OperationClient

OperationClient
abstract public class OperationClient (Code)
An operation client is the way an advanced user interacts with Axis2. Actual operation clients understand a specific MEP and hence their behavior is defined by their MEP. To interact with an operation client, you first get one from a specific AxisOperation. Then you set the messages into it one by one (whatever is available). Then, when you call execute() the client will execute what it can at that point. If executing the operation client results in a new message being created, then if a message receiver is registered with the client then the message will be delivered to that client.


Field Summary
protected  AxisCallbackaxisCallback
    
protected  AxisOperationaxisOp
    
protected  Callbackcallback
    
protected  booleancompleted
    
protected  OperationContextoc
    
protected  Optionsoptions
    
protected  ServiceContextsc
    

Constructor Summary
protected  OperationClient(AxisOperation axisOp, ServiceContext sc, Options options)
    

Method Summary
abstract public  voidaddMessageContext(MessageContext messageContext)
     Add a message context to the client for processing.
protected  voidaddReferenceParameters(MessageContext msgctx)
    
public  voidcomplete(MessageContext msgCtxt)
     To close the transport if necessary , can call this method.
final public  voidexecute(boolean block)
     Execute the MEP.
abstract public  voidexecuteImpl(boolean block)
     Execute the MEP.
abstract public  MessageContextgetMessageContext(String messageLabel)
     Return a message from the client - will return null if the requested message is not available.
public  OperationContextgetOperationContext()
    
public  OptionsgetOptions()
     Return the options used by this client.
protected  voidprepareMessageContext(ConfigurationContext configurationContext, MessageContext mc)
     prepareMessageContext gets a fresh new MessageContext ready to be sent.
public  voidreset()
     Reset the operation client to a clean status after the MEP has completed. This is how you can reuse an operation client.
abstract public  voidsetCallback(Callback callback)
     Set the callback to be executed when a message comes into the MEP and the operation client is executed.
final public  voidsetCallback(AxisCallback callback)
     Set the callback to be executed when a message comes into the MEP and the operation client is executed.
protected  voidsetMessageID(MessageContext mc)
     Create a message ID for the given message context if needed.
public  voidsetOptions(Options options)
     Sets the options that should be used for this particular client.

Field Detail
axisCallback
protected AxisCallback axisCallback(Code)



axisOp
protected AxisOperation axisOp(Code)



callback
protected Callback callback(Code)



completed
protected boolean completed(Code)



oc
protected OperationContext oc(Code)



options
protected Options options(Code)



sc
protected ServiceContext sc(Code)




Constructor Detail
OperationClient
protected OperationClient(AxisOperation axisOp, ServiceContext sc, Options options)(Code)




Method Detail
addMessageContext
abstract public void addMessageContext(MessageContext messageContext) throws AxisFault(Code)
Add a message context to the client for processing. This method must not process the message - it only records it in the operation client. Processing only occurs when execute() is called.
Parameters:
  messageContext - the message context
throws:
  AxisFault - if this is called inappropriately.



addReferenceParameters
protected void addReferenceParameters(MessageContext msgctx)(Code)



complete
public void complete(MessageContext msgCtxt) throws AxisFault(Code)
To close the transport if necessary , can call this method. The main usage of this method is when client uses two tarnsports for sending and receiving , and we need to remove entries for waiting calls in the transport listener queue. Note : DO NOT call this method if you are not using two transports to send and receive
Parameters:
  msgCtxt - : MessageContext# which has all the transport information
throws:
  AxisFault - : throws AxisFault if something goes wrong



execute
final public void execute(boolean block) throws AxisFault(Code)
Execute the MEP. This method is final and only serves to set (if appropriate) the lastOperationContext on the ServiceContext, and then it calls executeImpl(), which does the actual work.
Parameters:
  block - Indicates whether execution should block or return ASAP. Whatblock means is of course a function of the specific operationclient.
throws:
  AxisFault - if something goes wrong during the execution of the operationclient.



executeImpl
abstract public void executeImpl(boolean block) throws AxisFault(Code)
Execute the MEP. What this does depends on the specific operation client. The basic idea is to have the operation client execute and do something with the messages that have been added to it so far. For example, if its an Out-In MEP, then if the Out message has been set, then executing the client asks it to send the message and get the In message, possibly using a different thread.
Parameters:
  block - Indicates whether execution should block or return ASAP. Whatblock means is of course a function of the specific operationclient.
throws:
  AxisFault - if something goes wrong during the execution of the operationclient.



getMessageContext
abstract public MessageContext getMessageContext(String messageLabel) throws AxisFault(Code)
Return a message from the client - will return null if the requested message is not available.
Parameters:
  messageLabel - the message label of the desired message context the desired message context or null if its not available.
throws:
  AxisFault - if the message label is invalid



getOperationContext
public OperationContext getOperationContext()(Code)
To get the operation context of the operation client OperationContext



getOptions
public Options getOptions()(Code)
Return the options used by this client. If you want to set a single option, then the right way is to do getOptions() and set specific options. the options, which will never be null.



prepareMessageContext
protected void prepareMessageContext(ConfigurationContext configurationContext, MessageContext mc) throws AxisFault(Code)
prepareMessageContext gets a fresh new MessageContext ready to be sent. It sets up the necessary properties, transport information, etc.
Parameters:
  configurationContext - the active ConfigurationContext
Parameters:
  mc - the MessageContext to be configured
throws:
  AxisFault - if there is a problem



reset
public void reset() throws AxisFault(Code)
Reset the operation client to a clean status after the MEP has completed. This is how you can reuse an operation client. NOTE: this does not reset the options; only the internal state so the client can be used again.
throws:
  AxisFault - if reset is called before the MEP client has completed aninteraction.



setCallback
abstract public void setCallback(Callback callback)(Code)
Set the callback to be executed when a message comes into the MEP and the operation client is executed. This is the way the operation client provides notification that a message has been received by it. Exactly when its executed and under what conditions is a function of the specific operation client.
Parameters:
  callback - the callback to be used when the client decides its time touse it



setCallback
final public void setCallback(AxisCallback callback)(Code)
Set the callback to be executed when a message comes into the MEP and the operation client is executed. This is the way the operation client provides notification that a message has been received by it. Exactly when its executed and under what conditions is a function of the specific operation client.
Parameters:
  callback - the callback to be used when the client decides its time touse it



setMessageID
protected void setMessageID(MessageContext mc)(Code)
Create a message ID for the given message context if needed. If user gives an option with MessageID then just copy that into MessageContext , and with that there can be multiple message with same MessageID unless user call setOption for each invocation.

If user want to give message ID then the better way is to set the message ID in the option and call setOption for each invocation then the right thing will happen.

If user does not give a message ID then the new one will be created and set that into Message Context.
Parameters:
  mc - the message context whose id is to be set




setOptions
public void setOptions(Options options)(Code)
Sets the options that should be used for this particular client. This resets the entire set of options to use the new options - so you'd lose any option cascading that may have been set up.
Parameters:
  options - the options



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.