Package net.engio.mbassy.bus.error
Class PublicationError
java.lang.Object
net.engio.mbassy.bus.error.PublicationError
- Direct Known Subclasses:
InternalPublicationError
Publication errors are used to communicate exceptions that occur during message publication.
The most common reason is most likely an exception thrown during the execution of a message handler.
The publication error contains details about to the cause and location where error occurred.
They are passed to all registered instances of
IPublicationErrorHandler
configured within
the IBusConfiguration
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PublicationError
(Throwable cause, String errorMsg) PublicationError
(Throwable cause, String errorMsg, Method handler, Object listener, IMessagePublication publication) Compound constructor, creating a PublicationError from the supplied objects.PublicationError
(Throwable cause, String errorMsg, IMessagePublication publication) PublicationError
(Throwable cause, String errorMsg, SubscriptionContext context) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Assigns the cause of this PublicationError.setHandler
(Method handler) setListener
(Object listener) setMessage
(String message) setPublication
(IMessagePublication publication) setPublishedMessage
(Object message) toString()
-
Field Details
-
cause
-
errorMsg
-
handler
-
listener
-
publication
-
message
-
-
Constructor Details
-
PublicationError
public PublicationError(Throwable cause, String errorMsg, Method handler, Object listener, IMessagePublication publication) Compound constructor, creating a PublicationError from the supplied objects.- Parameters:
cause
- The Throwable giving rise to this PublicationError.errorMsg
- The message to send.handler
- The method where the error was created.listener
- The object in which the PublicationError was generated.publication
- The publication that errored
-
PublicationError
-
PublicationError
-
PublicationError
-
PublicationError
public PublicationError()Default constructor.
-
-
Method Details
-
getCause
- Returns:
- The Throwable giving rise to this PublicationError.
-
setCause
Assigns the cause of this PublicationError.- Parameters:
cause
- A Throwable which gave rise to this PublicationError.- Returns:
- This PublicationError.
-
getMessage
-
setMessage
-
setPublishedMessage
-
getHandler
-
setHandler
-
getListener
-
setListener
-
getPublishedMessage
-
setPublication
-
toString
-