Package org.glassfish.grizzly
Class TransformationResult<I,O>
- java.lang.Object
-
- org.glassfish.grizzly.TransformationResult<I,O>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransformationResult.Status
-
Constructor Summary
Constructors Modifier Constructor Description TransformationResult()
TransformationResult(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <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
getErrorCode()
String
getErrorDescription()
I
getExternalRemainder()
O
getMessage()
TransformationResult.Status
getStatus()
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)
String
toString()
-
-
-
Constructor Detail
-
TransformationResult
public TransformationResult()
-
TransformationResult
public TransformationResult(TransformationResult.Status status, O message, I externalRemainder)
-
TransformationResult
public TransformationResult(int errorCode, String errorDescription)
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 Detail
-
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
public static <I,O> TransformationResult<I,O> createIncompletedResult(I externalRemainder)
-
getMessage
public O getMessage()
-
setMessage
public void setMessage(O message)
-
getExternalRemainder
public I getExternalRemainder()
-
setExternalRemainder
public void setExternalRemainder(I externalRemainder)
-
getStatus
public TransformationResult.Status getStatus()
-
setStatus
public void setStatus(TransformationResult.Status status)
-
getErrorCode
public int getErrorCode()
-
setErrorCode
public void setErrorCode(int errorCode)
-
getErrorDescription
public String getErrorDescription()
-
setErrorDescription
public void setErrorDescription(String errorDescription)
-
reset
public void reset()
If implementation usesObjectPool
to store and reuseTransformationResult
instances - this method will be called beforeTransformationResult
will be offered to pool.
-
-