Package com.sun.xml.ws.api.pipe
Class NextAction
java.lang.Object
com.sun.xml.ws.api.pipe.NextAction
Indicates what shall happen after
Tube.processRequest(Packet) or
Tube.processResponse(Packet) returns.
To allow reuse of this object, this class is mutable.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabortResponse(Packet response) Indicates that the next action is to abort the processResponse chain because of some non-exception condition.Returnskindin a human readable string, to assist debugging.getNext()Returns the next tubeReturns the last PacketReturns the Throwable generated by the last TubevoidIndicates that the next action should be to invoke the next tube'sTube.processRequest(Packet), then later invoke the current tube'sTube.processResponse(Packet)with the response packet.voidinvokeAndForget(Tube next, Packet p) Indicates that the next action should be to invoke the next tube'sTube.processRequest(Packet), but the current tube doesn't want to receive the response packet to itsTube.processResponse(Packet).voidinvokeAsync(Tube next, Packet p) Indicates that the next action is to invoke the next tube in the tubeline async from the thread that started the tubeline.voidreturnWith(Packet response) Indicates that the next action is to flip the processing direction and starts response processing.voidSets the next tubevoidsuspend()Deprecated.voidDeprecated.Use variants that passRunnablevoidIndicates that the fiber should be suspended.voidIndicates that the fiber should be suspended.voidthrowException(Packet response, Throwable t) Indicates that the next action is to flip the processing direction and starts exception processing, but with the indicated context.voidIndicates that the next action is to flip the processing direction and starts exception processing.voidIndicates that the next action is to abort the processResponse chain because of an exception.toString()Dumps the contents to assist debugging.
-
Constructor Details
-
NextAction
public NextAction()Default constructor.
-
-
Method Details
-
invoke
Indicates that the next action should be to invoke the next tube'sTube.processRequest(Packet), then later invoke the current tube'sTube.processResponse(Packet)with the response packet. -
invokeAndForget
Indicates that the next action should be to invoke the next tube'sTube.processRequest(Packet), but the current tube doesn't want to receive the response packet to itsTube.processResponse(Packet). -
returnWith
Indicates that the next action is to flip the processing direction and starts response processing. -
throwException
Indicates that the next action is to flip the processing direction and starts exception processing, but with the indicated context.- Parameters:
t- EitherRuntimeExceptionorError, but defined to takeThrowablebecauseTube.processException(Throwable)takesThrowable.
-
throwException
Indicates that the next action is to flip the processing direction and starts exception processing.- Parameters:
t- EitherRuntimeExceptionorError, but defined to takeThrowablebecauseTube.processException(Throwable)takesThrowable.
-
throwExceptionAbortResponse
Indicates that the next action is to abort the processResponse chain because of an exception. How that exception is processed is not defined.- Parameters:
t- EitherRuntimeExceptionorError
-
abortResponse
Indicates that the next action is to abort the processResponse chain because of some non-exception condition.- Parameters:
response- The response that is being aborted
-
invokeAsync
Indicates that the next action is to invoke the next tube in the tubeline async from the thread that started the tubeline. Only fibers that were started using startSync should use this next action kind.- Parameters:
next- The next tube in the tubelinep- The request to pass to the next tube
-
suspend
Deprecated.Use variants that passRunnableIndicates that the fiber should be suspended. Onceresumed, return the response processing. -
suspend
Indicates that the fiber should be suspended. Once the currentThreadexits the fiber's control loop, the onExitRunnable will be invoked. ThisRunnablemay callFiber.resume(Packet); however it is still guaranteed that the current Thread will return control, therefore, further processing will be handled on aThreadfrom theExecutor. For synchronous cases, the Thread invoking this fiber cannot return until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable will be invoked prior to completing the suspension.- Since:
- 2.2.7
-
suspend
Deprecated.Use variants that passRunnableIndicates that the fiber should be suspended. Onceresumed, resume with theTube.processRequest(Packet)on the given next tube. -
suspend
Indicates that the fiber should be suspended. Once the currentThreadexits the fiber's control loop, the onExitRunnable will be invoked. ThisRunnablemay callFiber.resume(Packet); however it is still guaranteed that the current fiber will return control, therefore, further processing will be handled on aThreadfrom theExecutor. For synchronous cases, the Thread invoking this fiber cannot return until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable will be invoked prior to completing the suspension.Once
resumed, resume with theTube.processRequest(Packet)on the given next tube.- Since:
- 2.2.7
-
getNext
Returns the next tube- Returns:
- Next tube
-
setNext
Sets the next tube- Parameters:
next- Next tube
-
getPacket
Returns the last Packet- Returns:
- Packet
-
getThrowable
Returns the Throwable generated by the last Tube- Returns:
- the Throwable
-
toString
Dumps the contents to assist debugging. -
getKindString
Returnskindin a human readable string, to assist debugging.
-
Runnable