Class ReplayReporter

  • All Implemented Interfaces:
    IReporter, IReporterSupport

    public class ReplayReporter
    extends java.lang.Object
    implements IReporter, IReporterSupport
    An IReporter that may be used to intercept the reporting information and "replay" them later on on another IReporter instance.

    This is useful if an object receiving reporting information may be dynamically multiplexed on many reporting events emitting instances, for example a window showing a currently active object.

    • Constructor Summary

      Constructors 
      Constructor Description
      ReplayReporter​(java.lang.Object owner)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addMessage​(ReportMessage message)  
      void addReporter​(IReporter reporter)  
      java.lang.Object getOwner()  
      void removeReporter​(IReporter reporter)  
      protected void replay​(IReporter reporter)  
      void reportActivityEnd()
      Indicate the end of an activity.
      void reportActivityStart​(java.lang.String activity, int style)
      Indicate the beginning of an activity, possibly blocking system interaction.
      void reportError​(java.lang.String title, java.lang.String message, java.lang.Throwable t, int style)
      Indicate an error condition.
      void reportMessage​(java.lang.String title, java.lang.String message, int style)
      Report a message to the user.
      void reportProgress​(java.lang.String message, int percent, int style)
      Indicate the progress of an ongoing activity.
      void reportStatus​(java.lang.String message, int style)
      Report a simple state information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReplayReporter

        public ReplayReporter​(java.lang.Object owner)
    • Method Detail

      • addMessage

        protected void addMessage​(ReportMessage message)
      • getOwner

        public java.lang.Object getOwner()
      • replay

        protected void replay​(IReporter reporter)
      • reportActivityEnd

        public void reportActivityEnd()
        Description copied from interface: IReporter
        Indicate the end of an activity.
        Specified by:
        reportActivityEnd in interface IReporter
      • reportActivityStart

        public void reportActivityStart​(java.lang.String activity,
                                        int style)
        Description copied from interface: IReporter
        Indicate the beginning of an activity, possibly blocking system interaction.
        Specified by:
        reportActivityStart in interface IReporter
        Parameters:
        activity - A label for reporting the activity.
      • reportError

        public void reportError​(java.lang.String title,
                                java.lang.String message,
                                java.lang.Throwable t,
                                int style)
        Description copied from interface: IReporter
        Indicate an error condition. This method will return normally after a possible user interaction, any error handling is still up to the caller.
        Specified by:
        reportError in interface IReporter
      • reportMessage

        public void reportMessage​(java.lang.String title,
                                  java.lang.String message,
                                  int style)
        Description copied from interface: IReporter
        Report a message to the user. The message should be displayed in a blocking way in an interactive system.
        Specified by:
        reportMessage in interface IReporter
      • reportProgress

        public void reportProgress​(java.lang.String message,
                                   int percent,
                                   int style)
        Description copied from interface: IReporter
        Indicate the progress of an ongoing activity. The activity will probably run concurrently.
        Specified by:
        reportProgress in interface IReporter
      • reportStatus

        public void reportStatus​(java.lang.String message,
                                 int style)
        Description copied from interface: IReporter
        Report a simple state information. This should not block the system in any way.
        Specified by:
        reportStatus in interface IReporter