Package com.adobe.xfa
Class LogMessageHandler
java.lang.Object
com.adobe.xfa.LogMessageHandler
- Direct Known Subclasses:
LogMessageHandlerStore,MessageHandlerXML
LogMessageHandler base class. All message handlers
will derive from this class.
Class LogMessageHandler will eventually will support message filtering by Id.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears out message buffer(s)abstract voidflush()get(int nIndex) Retrieve a message based on its index.longRetrieve the messagehandler's thread idintabstract voidsendMessage(LogMessage oMessage) Pure virtual function.voidsetThreshold(int nThreshold) intsize()Retrieve the number of LogMessageobjects are in the collection.booleanCheck whether the handler supports read operations.
-
Constructor Details
-
LogMessageHandler
public LogMessageHandler()
-
-
Method Details
-
get
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
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 viaoperator[]. Thesize()method can be used to find out the number of messages cached.
-