Package com.adobe.xfa

Class LogMessageHandler

java.lang.Object
com.adobe.xfa.LogMessageHandler
Direct Known Subclasses:
LogMessageHandlerStore, MessageHandlerXML

public abstract class LogMessageHandler extends Object
LogMessageHandler base class. All message handlers will derive from this class. Class LogMessageHandler will eventually will support message filtering by Id.
  • Constructor Details

    • LogMessageHandler

      public LogMessageHandler()
  • Method Details

    • get

      public LogMessage get(int nIndex)
      Retrieve a message based on its index. where 0 invalid input: '<'= index invalid input: '<' size()

      - only valid for handlers that return true for the supportsRead method.
      Parameters:
      nIndex - - index into the collection
      Returns:
      a LogMessageobject
    • clearMessages

      public void clearMessages()
      Clears out message buffer(s)
    • getThreadId

      public long getThreadId()
      Retrieve the messagehandler's thread id
      Returns:
      a threadId
    • getThreshold

      public int getThreshold()
    • sendMessage

      public abstract void sendMessage(LogMessage oMessage)
      Pure virtual function. Implemented in derived classes to handle message output.

      if you want to cache messages, then the derived implementation of this method should add the following lines: LogMessage poMessage = new LogMessage(oMessage); getMessages().append(poMessage);
      Parameters:
      oMessage - - the message to send
    • setThreshold

      public void setThreshold(int nThreshold)
    • flush

      public abstract void flush()
    • size

      public int size()
      Retrieve the number of LogMessageobjects are in the collection.

      only valid for handlers that return true for the supportsRead method.
      Returns:
      - the number of LogMessageobjects in the collection
    • supportsRead

      public boolean supportsRead()
      Check whether the handler supports read operations. If this class' supportsRead() method returns true, then the messageHandler is capable of caching all of it's messages. These messages can be accessed via operator[]. The size() method can be used to find out the number of messages cached.