public final class NextAction extends Object
Tube.processRequest(Packet)
or
Tube.processResponse(Packet)
returns.
To allow reuse of this object, this class is mutable.
Constructor and Description |
---|
NextAction() |
Modifier and Type | Method and Description |
---|---|
void |
abortResponse(com.sun.xml.ws.api.message.Packet response)
Indicates that the next action is to abort the processResponse chain
because of some non-exception condition.
|
String |
getKindString()
Returns
kind in a human readable string, to assist debugging. |
Tube |
getNext()
Returns the next tube
|
com.sun.xml.ws.api.message.Packet |
getPacket()
Returns the last Packet
|
Throwable |
getThrowable()
Returns the Throwable generated by the last Tube
|
void |
invoke(Tube next,
com.sun.xml.ws.api.message.Packet p)
Indicates that the next action should be to
invoke the next tube's
Tube.processRequest(Packet) ,
then later invoke the current tube's Tube.processResponse(Packet)
with the response packet. |
void |
invokeAndForget(Tube next,
com.sun.xml.ws.api.message.Packet p)
Indicates that the next action should be to
invoke the next tube's
Tube.processRequest(Packet) ,
but the current tube doesn't want to receive the response packet to
its Tube.processResponse(Packet) . |
void |
invokeAsync(Tube next,
com.sun.xml.ws.api.message.Packet p)
Indicates that the next action is to invoke the next tube in the
tubeline async from the thread that started the tubeline.
|
void |
returnWith(com.sun.xml.ws.api.message.Packet response)
Indicates that the next action is to flip the processing direction
and starts response processing.
|
void |
setNext(Tube next)
Sets the next tube
|
void |
suspend()
Deprecated.
Use variants that pass
Runnable |
void |
suspend(Runnable onExitRunnable)
Indicates that the fiber should be suspended.
|
void |
suspend(Tube next)
Deprecated.
Use variants that pass
Runnable |
void |
suspend(Tube next,
Runnable onExitRunnable)
Indicates that the fiber should be suspended.
|
void |
throwException(com.sun.xml.ws.api.message.Packet response,
Throwable t)
Indicates that the next action is to flip the processing direction
and starts exception processing, but with the indicated context.
|
void |
throwException(Throwable t)
Indicates that the next action is to flip the processing direction
and starts exception processing.
|
void |
throwExceptionAbortResponse(Throwable t)
Indicates that the next action is to abort the processResponse chain
because of an exception.
|
String |
toString()
Dumps the contents to assist debugging.
|
public void invoke(Tube next, com.sun.xml.ws.api.message.Packet p)
Tube.processRequest(Packet)
,
then later invoke the current tube's Tube.processResponse(Packet)
with the response packet.public void invokeAndForget(Tube next, com.sun.xml.ws.api.message.Packet p)
Tube.processRequest(Packet)
,
but the current tube doesn't want to receive the response packet to
its Tube.processResponse(Packet)
.public void returnWith(com.sun.xml.ws.api.message.Packet response)
public void throwException(com.sun.xml.ws.api.message.Packet response, Throwable t)
t
- Either RuntimeException
or Error
, but defined to
take Throwable
because Tube.processException(Throwable)
takes Throwable
.public void throwException(Throwable t)
t
- Either RuntimeException
or Error
, but defined to
take Throwable
because Tube.processException(Throwable)
takes Throwable
.public void throwExceptionAbortResponse(Throwable t)
t
- Either RuntimeException
or Error
public void abortResponse(com.sun.xml.ws.api.message.Packet response)
response
- The response that is being abortedpublic void invokeAsync(Tube next, com.sun.xml.ws.api.message.Packet p)
next
- The next tube in the tubelinep
- The request to pass to the next tubepublic void suspend()
Runnable
resumed
, return the response processing.public void suspend(Runnable onExitRunnable)
Thread
exits the fiber's control loop, the onExitRunnable will be invoked. This Runnable
may call Fiber.resume(Packet)
; however it is still guaranteed that the current
Thread will return control, therefore, further processing will be handled on a Thread
from the Executor
. 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.public void suspend(Tube next)
Runnable
resumed
, resume with the
Tube.processRequest(Packet)
on the given next tube.public void suspend(Tube next, Runnable onExitRunnable)
Thread
exits the fiber's control loop, the onExitRunnable will be invoked. This Runnable
may call Fiber.resume(Packet)
; however it is still guaranteed that the current
fiber will return control, therefore, further processing will be handled on a Thread
from the Executor
. 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 the
Tube.processRequest(Packet)
on the given next tube.
public Tube getNext()
public void setNext(Tube next)
next
- Next tubepublic com.sun.xml.ws.api.message.Packet getPacket()
public Throwable getThrowable()
public String toString()
Copyright © 2015 Oracle Corporation. All rights reserved.