|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.client.OperationClient
public abstract class OperationClient
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 AxisCallback |
axisCallback
|
protected AxisOperation |
axisOp
|
protected Callback |
callback
|
protected boolean |
completed
|
protected OperationContext |
oc
|
protected Options |
options
|
protected ServiceContext |
sc
|
Constructor Summary | |
---|---|
protected |
OperationClient(AxisOperation axisOp,
ServiceContext sc,
Options options)
|
Method Summary | |
---|---|
abstract void |
addMessageContext(MessageContext messageContext)
Add a message context to the client for processing. |
protected void |
addReferenceParameters(MessageContext msgctx)
|
void |
complete(MessageContext msgCtxt)
To close the transport if necessary , can call this method. |
void |
execute(boolean block)
Execute the MEP. |
abstract void |
executeImpl(boolean block)
Execute the MEP. |
abstract MessageContext |
getMessageContext(java.lang.String messageLabel)
Return a message from the client - will return null if the requested message is not available. |
OperationContext |
getOperationContext()
To get the operation context of the operation client |
Options |
getOptions()
Return the options used by this client. |
protected void |
prepareMessageContext(ConfigurationContext configurationContext,
MessageContext mc)
prepareMessageContext gets a fresh new MessageContext ready to be sent. |
void |
reset()
Reset the operation client to a clean status after the MEP has completed. |
void |
setCallback(AxisCallback callback)
Set the callback to be executed when a message comes into the MEP and the operation client is executed. |
abstract void |
setCallback(Callback callback)
Deprecated. Please use the AxisCallback interface rather than Callback, which has been deprecated |
protected void |
setMessageID(MessageContext mc)
Create a message ID for the given message context if needed. |
void |
setOptions(Options options)
Sets the options that should be used for this particular client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AxisOperation axisOp
protected ServiceContext sc
protected Options options
protected OperationContext oc
protected Callback callback
protected AxisCallback axisCallback
protected boolean completed
Constructor Detail |
---|
protected OperationClient(AxisOperation axisOp, ServiceContext sc, Options options)
Method Detail |
---|
public void setOptions(Options options)
options
- the optionspublic Options getOptions()
public abstract void addMessageContext(MessageContext messageContext) throws AxisFault
messageContext
- the message context
AxisFault
- if this is called inappropriately.public abstract MessageContext getMessageContext(java.lang.String messageLabel) throws AxisFault
messageLabel
- the message label of the desired message context
AxisFault
- if the message label is invalidpublic abstract void setCallback(Callback callback)
callback
- the callback to be used when the client decides its time to
use itpublic final void setCallback(AxisCallback callback)
callback
- the callback to be used when the client decides its time to
use itpublic final void execute(boolean block) throws AxisFault
block
- Indicates whether execution should block or return ASAP. What
block means is of course a function of the specific operation
client.
AxisFault
- if something goes wrong during the execution of the operation
client.public abstract void executeImpl(boolean block) throws AxisFault
block
- Indicates whether execution should block or return ASAP. What
block means is of course a function of the specific operation
client.
AxisFault
- if something goes wrong during the execution of the operation
client.public void reset() throws AxisFault
AxisFault
- if reset is called before the MEP client has completed an
interaction.public void complete(MessageContext msgCtxt) throws AxisFault
msgCtxt
- : MessageContext# which has all the transport information
AxisFault
- : throws AxisFault if something goes wrongpublic OperationContext getOperationContext()
protected void setMessageID(MessageContext mc)
mc
- the message context whose id is to be setprotected void addReferenceParameters(MessageContext msgctx)
protected void prepareMessageContext(ConfigurationContext configurationContext, MessageContext mc) throws AxisFault
configurationContext
- the active ConfigurationContextmc
- the MessageContext to be configured
AxisFault
- if there is a problem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |