|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sdsu.logging.LoggerMessage
LoggerMessage and its subclasses are used by sdsu.logging.Logger. You only need to use this class directly when you are adding a new type of message to the logger. To create a new message type create a new subclass of this class. Pass the actual text of the message as an argument to the constructor of this class. Subclasses must implement the method getMessageType(). You also may wish to override the displayString saveString methods if you wish a different display output for your new message type.
The logging system is based on the logging pattern by Neil Harrison in Pattern Languages of Program Design 3 Eds Martin, Riehle, Buschman, 1998, pp 277-289
Logger
,
DebugMessage
, Serialized FormConstructor Summary | |
LoggerMessage(java.lang.String message)
|
Method Summary | |
java.lang.String |
displayString()
Displays a string to be displayed on the screen for this message. |
void |
fromString(java.lang.String objectString)
Converts a string to an object. |
abstract java.lang.String |
getMessageType()
Returns the type of the message. |
LabeledData |
getMetaData()
MetaData for Message contains key-value pair "class=objectClassName". |
java.lang.String |
logString()
Displays a string to be saved in a log for this message. |
void |
setMetaData(LabeledData metaData)
Required by Stringizable. |
java.lang.String |
toString()
Used in sending message to remote loggers. |
java.lang.String |
toString(java.lang.String header)
Converts the object to a string with given header information. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public LoggerMessage(java.lang.String message)
Method Detail |
public abstract java.lang.String getMessageType()
public void fromString(java.lang.String objectString) throws ConversionException
public void setMetaData(LabeledData metaData)
public LabeledData getMetaData()
public java.lang.String toString()
public java.lang.String toString(java.lang.String header)
public java.lang.String displayString()
public java.lang.String logString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |