Class Stage.Continuation<DATA>
java.lang.Object
org.glassfish.jersey.process.internal.Stage.Continuation<DATA>
- Type Parameters:
DATA- processed data type.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Check if there is a next stage present in the continuation.next()Get the stage to be invoked next ornullif no next stage ispresent.static <DATA> Stage.Continuation<DATA>of(DATA result) Create a terminal continuation from the processed data result.static <DATA> Stage.Continuation<DATA>Create a continuation from the processed data result and the stage to be invoked next.result()Get the data processing result.
-
Method Details
-
of
Create a continuation from the processed data result and the stage to be invoked next.- Type Parameters:
DATA- processed data type.- Parameters:
result- data processing result.next- stage to be invoked next.- Returns:
- a continuation with the supplied stage to be invoked
nextin the processing chain and the supplied processing result.
-
of
Create a terminal continuation from the processed data result.- Type Parameters:
DATA- processed data type.- Parameters:
result- data processing result.- Returns:
- terminal continuation with no
nextstage in the processing chain and the supplied processing result.
-
result
Get the data processing result.- Returns:
- data processing result.
-
next
Get the stage to be invoked next ornullif no next stage ispresent.- Returns:
- the stage to be invoked next or
nullif not present.
-
hasNext
public boolean hasNext()Check if there is a next stage present in the continuation.The absence of a next stage in the continuation indicates that the data processing reached a terminal stage and the
resultof the continuation represents the final result of the whole processing chain.- Returns:
trueif there is a next stage present in the continuation,falseotherwise.
-