Package io.vertx.core.eventbus
Class ReplyException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.vertx.core.VertxException
-
- io.vertx.core.eventbus.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 Summary
Constructors Modifier Constructor Description ReplyException(ReplyFailure failureType)
Create a ReplyExceptionReplyException(ReplyFailure failureType, int failureCode, String message)
Create a ReplyExceptionReplyException(ReplyFailure failureType, int failureCode, String message, boolean noStackTrace)
Create a ReplyException with all attributes.protected
ReplyException(ReplyFailure failureType, int failureCode, String message, Throwable cause, boolean noStackTrace)
Create a ReplyException with all attributes, including cause.
DefaultReplyExceptionMessageCodec
doesn't support Cause!
This ctor is meant to be used for extension, together with a custom codec.ReplyException(ReplyFailure failureType, String message)
Create a ReplyException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
failureCode()
Get the failure code for the messageReplyFailure
failureType()
Get the failure type for the messageString
toString()
-
Methods inherited from class io.vertx.core.VertxException
noStackTrace, noStackTrace, noStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
ReplyException
public ReplyException(ReplyFailure failureType, int failureCode, String message, boolean noStackTrace)
Create a ReplyException with all attributes.- Parameters:
failureType
- the failure typefailureCode
- 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.
DefaultReplyExceptionMessageCodec
doesn't support Cause!
This ctor is meant to be used for extension, together with a custom codec.- Parameters:
failureType
- the failure typefailureCode
- 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 typefailureCode
- the failure codemessage
- the failure message
-
ReplyException
public ReplyException(ReplyFailure failureType, String message)
Create a ReplyException- Parameters:
failureType
- the failure typemessage
- 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
-
-