Class JMSContinuation
- java.lang.Object
-
- org.apache.cxf.transport.jms.continuations.JMSContinuation
-
- All Implemented Interfaces:
Continuation
public class JMSContinuation extends Object implements Continuation
-
-
Constructor Summary
Constructors Constructor Description JMSContinuation(Bus b, Message m, MessageObserver observer, Counter suspendendContinuations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancelTimerTask()protected voidcreateTimerTask(long timeout)protected voiddoResume()ObjectgetObject()Get arbitrary object associated with the continuation for contextbooleanisNew()Is this a newly created Continuation.booleanisPending()Get the pending statusbooleanisReadyForWrite()booleanisResumed()Get the resumed statusbooleanisTimeout()Get the timeout statusvoidreset()Reset the continuationvoidresume()Resume a suspended requestvoidsetObject(Object o)Sets arbitrary object associated with the continuation for contextbooleansuspend(long timeout)This method will suspend the request for the timeout or until resume is called
-
-
-
Constructor Detail
-
JMSContinuation
public JMSContinuation(Bus b, Message m, MessageObserver observer, Counter suspendendContinuations)
-
-
Method Detail
-
getObject
public Object getObject()
Description copied from interface:ContinuationGet arbitrary object associated with the continuation for context- Specified by:
getObjectin interfaceContinuation- Returns:
- An arbitrary object associated with the continuation
-
isNew
public boolean isNew()
Description copied from interface:ContinuationIs this a newly created Continuation.- Specified by:
isNewin interfaceContinuation- Returns:
- true if the continuation has just been created and has not yet suspended the request.
-
isPending
public boolean isPending()
Description copied from interface:ContinuationGet the pending status- Specified by:
isPendingin interfaceContinuation- Returns:
- true if the continuation has been suspended.
-
isResumed
public boolean isResumed()
Description copied from interface:ContinuationGet the resumed status- Specified by:
isResumedin interfaceContinuation- Returns:
- true if the continuation is has been resumed.
-
reset
public void reset()
Description copied from interface:ContinuationReset the continuation- Specified by:
resetin interfaceContinuation
-
resume
public void resume()
Description copied from interface:ContinuationResume a suspended request- Specified by:
resumein interfaceContinuation
-
doResume
protected void doResume()
-
setObject
public void setObject(Object o)
Description copied from interface:ContinuationSets arbitrary object associated with the continuation for context- Specified by:
setObjectin interfaceContinuation- Parameters:
o- An arbitrary object to associate with the continuation
-
suspend
public boolean suspend(long timeout)
Description copied from interface:ContinuationThis method will suspend the request for the timeout or until resume is called- Specified by:
suspendin interfaceContinuation- Parameters:
timeout- the suspend timeout, timeout of 0 will suspend the request indefinitely.- Returns:
- true if suspend was successful.
-
createTimerTask
protected void createTimerTask(long timeout)
-
cancelTimerTask
protected void cancelTimerTask()
-
isReadyForWrite
public boolean isReadyForWrite()
- Specified by:
isReadyForWritein interfaceContinuation
-
isTimeout
public boolean isTimeout()
Description copied from interface:ContinuationGet the timeout status- Specified by:
isTimeoutin interfaceContinuation- Returns:
- true if the continuation is has been timeout.
-
-