public abstract class EventData
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EVENT_POSITION |
static java.lang.String |
EVENT_TIME |
protected long |
eventPosition
Time ordered position for multiple occurrences of the same event.
|
static java.lang.String |
SESSION_UUID |
protected java.lang.String |
sessionUuid
Session UUID of JVM where this event data was collected.
|
protected long |
time
Timestamp when the event data was collected.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EventData() |
| Modifier and Type | Method and Description |
|---|---|
long |
getEventPosition() |
java.lang.String |
getSessionUuid() |
long |
getTime() |
protected abstract boolean |
isCompletelyEqualsImpl(EventData other)
Subclasses shall provide an implementation that compares its specific
properties to the respective properties of the other instance given as
argument.
|
boolean |
isCompletelyEqualsTo(EventData other)
Indicates weather all properties are equal to the respective properties
of the other instance given as argument.
|
protected boolean |
read(java.lang.String message,
char messagePrefix)
Reads an event from the encoded string representation.
|
abstract java.lang.StringBuilder |
readableString(java.lang.StringBuilder builder)
Writes a concise, human readable string representation of the event into
the supplied StringBuilder.
|
protected abstract boolean |
readPropertyImpl(EventReader reader,
java.lang.String key)
Subclasses shall provide an implementation that reads its specific
properties from the encoded string representation.
|
protected void |
reset()
Reverts all event attributes to their constructor initial value.
|
protected abstract void |
resetImpl()
Subclasses shall provide an implementation that resets its specific
properties to their constructor initial value.
|
java.lang.StringBuilder |
write(java.lang.StringBuilder sb,
char messagePrefix)
Writes an encoded string representation of the event into the supplied
StringBuilder.
|
protected abstract void |
writePropertiesImpl(EventWriter w)
Subclasses shall provide an implementation that appends its specific
properties to the encoded string representation.
|
protected java.lang.String sessionUuid
protected long eventPosition
protected long time
public static final java.lang.String SESSION_UUID
public static final java.lang.String EVENT_POSITION
public static final java.lang.String EVENT_TIME
public java.lang.String getSessionUuid()
public long getEventPosition()
public long getTime()
protected final void reset()
protected abstract void resetImpl()
public final boolean isCompletelyEqualsTo(EventData other)
other - the other EventData instance been compared to.protected abstract boolean isCompletelyEqualsImpl(EventData other)
other - the other EventData instance been compared to.public abstract java.lang.StringBuilder readableString(java.lang.StringBuilder builder)
builder - The StringBuilder that receives the string representationpublic final java.lang.StringBuilder write(java.lang.StringBuilder sb,
char messagePrefix)
sb - The StringBuilder that receives the encoded representation.messagePrefix - A prefix character used by an parser to recognize
the encoded message.protected abstract void writePropertiesImpl(EventWriter w)
w - The EventWriter that encodes the properties.protected final boolean read(java.lang.String message,
char messagePrefix)
false, but some properties may already have
been assigned.message - The string that is supposed to contain an encoded string
representation of the event.messagePrefix - message prefixtrue if an event was successfully read;
false otherwise.protected abstract boolean readPropertyImpl(EventReader reader, java.lang.String key) throws java.io.IOException
reader - The EventReader that is parsing the message. Use this parser to
retrieve the property value.key - The property key.java.io.IOException - the EventReader failed to parse the encoded property
value.