Class TransformationResult<I,​O>

  • All Implemented Interfaces:
    Cacheable

    public class TransformationResult<I,​O>
    extends Object
    implements Cacheable
    Represents the result of message encoding/decoding.
    Author:
    Alexey Stashok
    • Constructor Detail

      • TransformationResult

        public TransformationResult()
      • TransformationResult

        public TransformationResult​(int errorCode,
                                    String errorDescription)
        Creates error transformation result with specific code and description.
        Parameters:
        errorCode - id of the error
        errorDescription - error description
    • 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)
      • getErrorCode

        public int getErrorCode()
      • setErrorCode

        public void setErrorCode​(int errorCode)
      • getErrorDescription

        public String getErrorDescription()
      • setErrorDescription

        public void setErrorDescription​(String errorDescription)