Class WireCommands.ErrorMessage

  • All Implemented Interfaces:
    Reply, WireCommand
    Enclosing class:
    WireCommands

    public static final class WireCommands.ErrorMessage
    extends java.lang.Object
    implements Reply, WireCommand
    A generic error response that encapsulates an error code (to be used for client-side processing) and an error message describing the origin of the error. This should be used to describe general exceptions where limited information is required.
    • Constructor Detail

      • ErrorMessage

        @ConstructorProperties({"requestId","segment","message","errorCode"})
        public ErrorMessage​(long requestId,
                            java.lang.String segment,
                            java.lang.String message,
                            WireCommands.ErrorMessage.ErrorCode errorCode)
    • Method Detail

      • process

        public void process​(ReplyProcessor cp)
                     throws java.lang.UnsupportedOperationException
        Specified by:
        process in interface Reply
        Throws:
        java.lang.UnsupportedOperationException
      • writeFields

        public void writeFields​(java.io.DataOutput out)
                         throws java.io.IOException
        Specified by:
        writeFields in interface WireCommand
        Throws:
        java.io.IOException
      • getThrowableException

        public java.lang.RuntimeException getThrowableException()
      • isFailure

        public boolean isFailure()
        Specified by:
        isFailure in interface Reply
      • getRequestId

        public long getRequestId()
        Specified by:
        getRequestId in interface Reply
      • getSegment

        public java.lang.String getSegment()
      • getMessage

        public java.lang.String getMessage()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object