|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openhealthexchange.openpixpdq.ihe.audit.BsdMessenger
class BsdMessenger
Sends the message to a given BSD logger. The original idea was to use Log4J's bsd logger, but that ended up being way too complex, so I just rolled my own. Note that if your message is over 1024, you might be hosed since many BSD loggers only take 1024 messages.
You will need to do something to keep this thread safe. The simple solution (and the one currently implemented) is to generate a new instance of this class every time you make a new message. That is how it currently works. Otherwise the IheAuditTrail will have to do a bunch more work to keep the single instance synchronized. (Not to mention that there might be different audit servers used by different actors.)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openhealthexchange.openpixpdq.ihe.audit.IMessageTransmitter |
---|
IMessageTransmitter.Severity |
Constructor Summary | |
---|---|
BsdMessenger(AuditTrailDescription description)
Use to create a "connection" to a BSD audit repository. |
Method Summary | |
---|---|
AuditTrailDescription |
getAuditTrailDescription()
Gets the audit trail description |
void |
sendMessage(java.lang.String message)
Sends BSD message using the default facility and level. |
void |
sendMessage(java.lang.String message,
IMessageTransmitter.Severity severity)
Sends BSD message using a givien facility and level. |
void |
setDefaultSeverity(IMessageTransmitter.Severity severity)
Sets the severity to be used for non specific messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BsdMessenger(AuditTrailDescription description)
description
- All the info needed to connect to the audit repository.Method Detail |
---|
public void sendMessage(java.lang.String message)
sendMessage
in interface IMessageTransmitter
public void sendMessage(java.lang.String message, IMessageTransmitter.Severity severity)
sendMessage
in interface IMessageTransmitter
public void setDefaultSeverity(IMessageTransmitter.Severity severity)
setDefaultSeverity
in interface IMessageTransmitter
public AuditTrailDescription getAuditTrailDescription()
getAuditTrailDescription
in interface IMessageTransmitter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |