Schnittstelle IMessageHandler

Alle bekannten Unterschnittstellen:
IMessageHolder
Alle bekannten Implementierungsklassen:
CountingMessageHandler, DefaultMessageHandler, MessageHandler, MessageWriter, PinpointingMessageHandler, WeavingAdaptor.WeavingAdaptorMessageHolder, WeavingAdaptor.WeavingAdaptorMessageWriter

public interface IMessageHandler
Handle messages, logging and/or aborting as appropriate. Implementations define which messages are logged and whether the handler aborts the process. For messages that are costly to construct, clients may query isIgnoring(IMessage.Kind) to avoid construction if the message will be ignored. Clients passing messages to an IMessageHandler should not interfere with aborts by catching AbortException unless otherwise required by their logic or the message handler.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final IMessageHandler
    print all to System.err and throw AbortException on failure or abort messages
    static final IMessageHandler
    print all to System.out but do not throw AbortException on failure or abort messages
    static final IMessageHandler
    Throw exceptions for anything with ERROR or greater severity
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Allow fine grained configuration after initialization.
    boolean
    Handle message, by reporting and/or throwing an AbortException.
    void
    Allow fine grained configuration after initialization.
    boolean
    Signal clients whether this will ignore messages of a given type.
  • Felddetails

    • SYSTEM_ERR

      static final IMessageHandler SYSTEM_ERR
      print all to System.err and throw AbortException on failure or abort messages
    • SYSTEM_OUT

      static final IMessageHandler SYSTEM_OUT
      print all to System.out but do not throw AbortException on failure or abort messages
    • THROW

      static final IMessageHandler THROW
      Throw exceptions for anything with ERROR or greater severity
  • Methodendetails

    • handleMessage

      boolean handleMessage(IMessage message) throws AbortException
      Handle message, by reporting and/or throwing an AbortException.
      Parameter:
      message - the IMessage to handle - never null
      Gibt zurück:
      true if this message was handled by this handler
      Löst aus:
      IllegalArgumentException - if message is null
      AbortException - depending on handler logic.
    • isIgnoring

      boolean isIgnoring(IMessage.Kind kind)
      Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.
      Gibt zurück:
      true if this handler is ignoring all messages of this type
    • dontIgnore

      void dontIgnore(IMessage.Kind kind)
      Allow fine grained configuration after initialization. Minaly used in LTW. Most of the implementation can have this method be a no-op.
      Parameter:
      kind -
    • ignore

      void ignore(IMessage.Kind kind)
      Allow fine grained configuration after initialization.
      Parameter:
      kind -