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)
        Constructor
        Parameters:
        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.
        Parameters:
        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.
        Returns:
        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.
        Parameters:
        nId - the message Id
        sText - the message text
        eSeverity - the message severity
      • sendMessage

        public void sendMessage​(LogMessage message)
        Send message to target.
        Parameters:
        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.
        Parameters:
        model - the configuration model containing the messaging information
        Throws:
        InvalidOptionValueException - thrown if the user specified an invalid severity in the configuration options.