|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.slf4j.ext.EventData
public class EventData
Base class for Event Data. Event Data contains data to be logged about an event. Users may extend this class for each EventType they want to log.
Field Summary | |
---|---|
static java.lang.String |
EVENT_DATETIME
|
static java.lang.String |
EVENT_ID
|
static java.lang.String |
EVENT_MESSAGE
|
static java.lang.String |
EVENT_TYPE
|
Constructor Summary | |
---|---|
EventData()
Default Constructor |
|
EventData(java.util.Map<java.lang.String,java.lang.Object> map)
Constructor to create event data from a Map. |
|
EventData(java.lang.String xml)
Construct from a serialized form of the Map containing the RequestInfo elements |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compare two EventData objects for equality. |
java.io.Serializable |
get(java.lang.String name)
Retrieve an event attribute. |
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
getEntrySetIterator()
Returns an Iterator over all the entries in the EventDAta. |
java.util.Date |
getEventDateTime()
Retrieve the date and time the event occurred. |
java.lang.String |
getEventId()
Retrieve the event identifier. |
java.util.Map<java.lang.String,java.lang.Object> |
getEventMap()
Retrieve all the attributes in the EventData as a Map. |
java.lang.String |
getEventType()
Retrieve the type of the event. |
java.lang.String |
getMessage()
Retrieve the message text associated with this event, if any. |
int |
getSize()
Returns the number of attributes in the EventData. |
int |
hashCode()
Compute the hashCode for this EventData instance. |
void |
put(java.lang.String name,
java.io.Serializable obj)
Add arbitrary attributes about the event. |
void |
putAll(java.util.Map<java.lang.String,java.lang.Object> data)
Populate the event data from a Map. |
void |
setEventDateTime(java.util.Date eventDateTime)
Set the date and time the event occurred in case it is not the same as when the event was logged. |
void |
setEventId(java.lang.String eventId)
Set the event identifier. |
void |
setEventType(java.lang.String eventType)
Set the type of event that occurred. |
void |
setMessage(java.lang.String message)
Set the message text associated with this event. |
java.lang.String |
toString()
Convert the EventData to a String. |
java.lang.String |
toXML()
Serialize all the EventData items into an XML representation. |
static java.lang.String |
toXML(java.util.Map<java.lang.String,java.lang.Object> map)
Serialize all the EventData items into an XML representation. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EVENT_MESSAGE
public static final java.lang.String EVENT_TYPE
public static final java.lang.String EVENT_DATETIME
public static final java.lang.String EVENT_ID
Constructor Detail |
---|
public EventData()
public EventData(java.util.Map<java.lang.String,java.lang.Object> map)
map
- The event data.public EventData(java.lang.String xml)
xml
- The serialized form of the RequestInfo Map.Method Detail |
---|
public java.lang.String toXML()
public static java.lang.String toXML(java.util.Map<java.lang.String,java.lang.Object> map)
public java.lang.String getEventId()
public void setEventId(java.lang.String eventId)
eventId
- The event identifier.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- The message text.public java.util.Date getEventDateTime()
public void setEventDateTime(java.util.Date eventDateTime)
eventDateTime
- The event Date.public void setEventType(java.lang.String eventType)
eventType
- The type of the event.public java.lang.String getEventType()
public void put(java.lang.String name, java.io.Serializable obj)
name
- The attribute's key.obj
- The data associated with the key.public java.io.Serializable get(java.lang.String name)
name
- The attribute's key.
public void putAll(java.util.Map<java.lang.String,java.lang.Object> data)
data
- The Map to copy.public int getSize()
public java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> getEntrySetIterator()
public java.util.Map<java.lang.String,java.lang.Object> getEventMap()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The Object to compare.
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |