java.lang.Object
org.glassfish.grizzly.TransformationResult<I,O>
- All Implemented Interfaces:
Cacheable
Represents the result of message encoding/decoding.
- Author:
- Alexey Stashok
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionTransformationResult
(int errorCode, String errorDescription) Creates error transformation result with specific code and description.TransformationResult
(TransformationResult.Status status, O message, I externalRemainder) protected
TransformationResult
(TransformationResult.Status status, O message, I externalRemainder, int errorCode, String errorDescription) -
Method Summary
Modifier and TypeMethodDescriptionstatic <I,
O> TransformationResult<I, O> createCompletedResult
(O message, I externalRemainder) static <I,
O> TransformationResult<I, O> createErrorResult
(int errorCode, String errorDescription) static <I,
O> TransformationResult<I, O> createIncompletedResult
(I externalRemainder) int
void
recycle()
Recycle thisContext
void
reset()
If implementation usesObjectPool
to store and reuseTransformationResult
instances - this method will be called beforeTransformationResult
will be offered to pool.void
setErrorCode
(int errorCode) void
setErrorDescription
(String errorDescription) void
setExternalRemainder
(I externalRemainder) void
setMessage
(O message) void
setStatus
(TransformationResult.Status status) toString()
-
Constructor Details
-
TransformationResult
public TransformationResult() -
TransformationResult
-
TransformationResult
Creates error transformation result with specific code and description.- Parameters:
errorCode
- id of the errorerrorDescription
- error description
-
TransformationResult
protected TransformationResult(TransformationResult.Status status, O message, I externalRemainder, int errorCode, String errorDescription)
-
-
Method Details
-
createErrorResult
public static <I,O> TransformationResult<I,O> createErrorResult(int errorCode, String errorDescription) -
createCompletedResult
public static <I,O> TransformationResult<I,O> createCompletedResult(O message, I externalRemainder) -
createIncompletedResult
-
getMessage
-
setMessage
-
getExternalRemainder
-
setExternalRemainder
-
getStatus
-
setStatus
-
getErrorCode
public int getErrorCode() -
setErrorCode
public void setErrorCode(int errorCode) -
getErrorDescription
-
setErrorDescription
-
toString
-
reset
public void reset()If implementation usesObjectPool
to store and reuseTransformationResult
instances - this method will be called beforeTransformationResult
will be offered to pool. -
recycle
public void recycle()Recycle thisContext
-