Package com.adobe.xfa

Class LogMessenger

  • public class LogMessenger
    extends java.lang.Object
    A class to represent a log messenger.
    • Constructor Detail

      • LogMessenger

        public LogMessenger()
        Instantiates a log messenger.
      • LogMessenger

        public LogMessenger​(LogMessageHandler handler,
                            java.lang.String sAppContext)
        handler - pointer to a message handler
        sAppContext - a string representing the application context/name
    • Method Detail

      • addHandler

        public void addHandler​(LogMessageHandler handler,
                               java.lang.String sAppContext)
        Add a message handler.
        handler - a message handler
        sAppContext - a string representing the application context/name
      • getSeverity

        public int getSeverity()
        As the messenger sends messages we keep track of the highest severity message sent.
        a int enum, representing the highest severity message sent by this messenger.
      • removeStoredMessages

        public void removeStoredMessages()
      • flush

        public void flush()
        Flush target.
      • sendMessage

        public void sendMessage​(int nId,
                                java.lang.String sText,
                                int eSeverity)
        Send message to target.
        nId - the message Id
        sText - the message text
        eSeverity - the message severity
      • sendMessage

        public void sendMessage​(LogMessage message)
        Send message to target.
        message - the message
      • storedMsgArray

        public java.util.List<LogMessage> storedMsgArray()
      • updateMessaging

        public void updateMessaging​(Model model)
        Check through the messaging elements in the configuration model and add them to a cache. When ever messages are sent, we will compare with the cache to see if the message severity needs to be modified.
        model - the configuration model containing the messaging information
        InvalidOptionValueException - thrown if the user specified an invalid severity in the configuration options.