Class PublicationError

  • Direct Known Subclasses:
    InternalPublicationError

    public class PublicationError
    extends java.lang.Object
    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 Detail

      • cause

        private java.lang.Throwable cause
      • errorMsg

        private java.lang.String errorMsg
      • handler

        private java.lang.reflect.Method handler
      • listener

        private java.lang.Object listener
      • message

        private java.lang.Object message
    • Constructor Detail

      • PublicationError

        public PublicationError​(java.lang.Throwable cause,
                                java.lang.String errorMsg,
                                java.lang.reflect.Method handler,
                                java.lang.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

        public PublicationError​(java.lang.Throwable cause,
                                java.lang.String errorMsg,
                                IMessagePublication publication)
      • PublicationError

        public PublicationError​(java.lang.Throwable cause,
                                java.lang.String errorMsg,
                                SubscriptionContext context)
      • PublicationError

        public PublicationError​(java.lang.Throwable cause,
                                java.lang.String errorMsg)
      • PublicationError

        public PublicationError()
        Default constructor.
    • Method Detail

      • getCause

        public java.lang.Throwable getCause()
        Returns:
        The Throwable giving rise to this PublicationError.
      • setCause

        public PublicationError setCause​(java.lang.Throwable cause)
        Assigns the cause of this PublicationError.
        Parameters:
        cause - A Throwable which gave rise to this PublicationError.
        Returns:
        This PublicationError.
      • getMessage

        public java.lang.String getMessage()
      • setPublishedMessage

        public PublicationError setPublishedMessage​(java.lang.Object message)
      • getHandler

        public java.lang.reflect.Method getHandler()
      • setHandler

        public PublicationError setHandler​(java.lang.reflect.Method handler)
      • getListener

        public java.lang.Object getListener()
      • setListener

        public PublicationError setListener​(java.lang.Object listener)
      • getPublishedMessage

        public java.lang.Object getPublishedMessage()
      • toString

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