public class Event extends Object
Constructor and Description |
---|
Event()
Constructs the event of unspecified type and without a name.
|
Event(String name,
String type)
Constructs the event of specified type with specified name.
|
Event(String name,
String type,
long timestamp)
Constructs the event of specified type with specified name.
|
Event(String name,
String type,
Map<String,Object> body)
Constructs the event of specified type with specified name.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getBody()
Returns the body of the event.
|
Object |
getBodyItem(String key)
Returns the item of the event's body.
|
String |
getName()
Returns the name of the event.
|
long |
getTimestamp()
Returns the timestamp of the event.
|
String |
getType()
Returns the type of the event.
|
void |
setBodyItem(String key,
Object value)
Sets the item of the event's body.
|
public Event()
public Event(String name, String type)
name
- the name of the eventtype
- the type of the eventpublic Event(String name, String type, long timestamp)
name
- the name of the eventtype
- the type of the eventpublic String getName()
public long getTimestamp()
public String getType()
public Object getBodyItem(String key)
key
- the key of event itemCopyright © 2017. All rights reserved.