Package com.adobe.xfa
Class LogMessenger
- java.lang.Object
-
- com.adobe.xfa.LogMessenger
-
public class LogMessenger extends java.lang.Object
A class to represent a log messenger.
-
-
Constructor Summary
Constructors Constructor Description LogMessenger()
Instantiates a log messenger.LogMessenger(LogMessageHandler handler, java.lang.String sAppContext)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHandler(LogMessageHandler handler, java.lang.String sAppContext)
Add a message handler.void
flush()
Flush target.int
getSeverity()
As the messenger sends messages we keep track of the highest severity message sent.void
removeStoredMessages()
void
sendMessage(int nId, java.lang.String sText, int eSeverity)
Send message to target.void
sendMessage(LogMessage message)
Send message to target.java.util.List<LogMessage>
storedMsgArray()
void
updateMessaging(Model model)
Check through the messaging elements in the configuration model and add them to a cache.
-
-
-
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 handlersAppContext
- 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 handlersAppContext
- 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 IdsText
- the message texteSeverity
- 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.
-
-