Class ReplyException

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    ServiceException

    public class ReplyException
    extends VertxException
    Represents the failure of a message send.

    If a message was sent specifying a reply handler and the message delivery fails, a failure will be provided to the reply handler and the cause of the failure will be an instance of this.

    Author:
    Tim Fox
    See Also:
    Serialized Form
    • Constructor Detail

      • ReplyException

        public ReplyException​(ReplyFailure failureType,
                              int failureCode,
                              String message,
                              boolean noStackTrace)
        Create a ReplyException with all attributes.
        Parameters:
        failureType - the failure type
        failureCode - the failure code (e.g. 404)
        message - the failure message
      • ReplyException

        protected ReplyException​(ReplyFailure failureType,
                                 int failureCode,
                                 String message,
                                 Throwable cause,
                                 boolean noStackTrace)
        Create a ReplyException with all attributes, including cause.
        Default ReplyExceptionMessageCodec doesn't support Cause!
        This ctor is meant to be used for extension, together with a custom codec.
        Parameters:
        failureType - the failure type
        failureCode - the failure code (e.g. 404)
        message - the failure message
      • ReplyException

        public ReplyException​(ReplyFailure failureType,
                              int failureCode,
                              String message)
        Create a ReplyException
        Parameters:
        failureType - the failure type
        failureCode - the failure code
        message - the failure message
      • ReplyException

        public ReplyException​(ReplyFailure failureType,
                              String message)
        Create a ReplyException
        Parameters:
        failureType - the failure type
        message - the failure message
      • ReplyException

        public ReplyException​(ReplyFailure failureType)
        Create a ReplyException
        Parameters:
        failureType - the failure type
    • Method Detail

      • failureType

        public ReplyFailure failureType()
        Get the failure type for the message
        Returns:
        the failure type
      • failureCode

        public int failureCode()
        Get the failure code for the message
        Returns:
        the failure code