public class EventData extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_DATETIME |
static String |
EVENT_ID |
static String |
EVENT_MESSAGE |
static String |
EVENT_TYPE |
Constructor and Description |
---|
EventData()
Default Constructor
|
EventData(Map<String,Object> map)
Constructor to create event data from a Map.
|
EventData(String xml)
Construct from a serialized form of the Map containing the RequestInfo
elements
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compare two EventData objects for equality.
|
Serializable |
get(String name)
Retrieve an event attribute.
|
Iterator<Map.Entry<String,Object>> |
getEntrySetIterator()
Returns an Iterator over all the entries in the EventData.
|
Date |
getEventDateTime()
Retrieve the date and time the event occurred.
|
String |
getEventId()
Retrieve the event identifier.
|
Map<String,Object> |
getEventMap()
Retrieve all the attributes in the EventData as a Map.
|
String |
getEventType()
Retrieve the type of the event.
|
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(String name,
Serializable obj)
Add arbitrary attributes about the event.
|
void |
putAll(Map<String,Object> data)
Populate the event data from a Map.
|
void |
setEventDateTime(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(String eventId)
Set the event identifier.
|
void |
setEventType(String eventType)
Set the type of event that occurred.
|
void |
setMessage(String message)
Set the message text associated with this event.
|
String |
toString()
Convert the EventData to a String.
|
String |
toXML()
Serialize all the EventData items into an XML representation.
|
static String |
toXML(Map<String,Object> map)
Serialize all the EventData items into an XML representation.
|
public static final String EVENT_MESSAGE
public static final String EVENT_TYPE
public static final String EVENT_DATETIME
public static final String EVENT_ID
public EventData()
public EventData(Map<String,Object> map)
map
- The event data.public EventData(String xml)
xml
- The serialized form of the RequestInfo Map.public String toXML()
public static String toXML(Map<String,Object> map)
map
- the Map to transformpublic String getEventId()
public void setEventId(String eventId)
eventId
- The event identifier.public String getMessage()
public void setMessage(String message)
message
- The message text.public Date getEventDateTime()
public void setEventDateTime(Date eventDateTime)
eventDateTime
- The event Date.public void setEventType(String eventType)
eventType
- The type of the event.public String getEventType()
public void put(String name, Serializable obj)
name
- The attribute's key.obj
- The data associated with the key.public Serializable get(String name)
name
- The attribute's key.public void putAll(Map<String,Object> data)
data
- The Map to copy.public int getSize()
public Iterator<Map.Entry<String,Object>> getEntrySetIterator()
public Map<String,Object> getEventMap()
public String toString()
public boolean equals(Object o)
Copyright © 2017 JBoss by Red Hat. All rights reserved.