public class Event extends EventObject
source
Constructor and Description |
---|
Event(Object source,
int id,
boolean state) |
Event(Object source,
int id,
Throwable error) |
Modifier and Type | Method and Description |
---|---|
Event |
addAttribute(String key,
Object value)
Add an attribute to the event
|
String |
getAllAttributes()
Return a string representing all attributes.
|
Object |
getAttribute(String key)
Get the value of an event attribute
|
int |
getId()
Get the unique event id
|
boolean |
getState()
Get the event state.
|
getSource, toString
public Event(Object source, int id, boolean state)
source
- source of eventid
- event codeboolean
- state true=successful false=unsuccessfulpublic int getId()
public boolean getState()
#STATE_SUCCESSFUL
or
#STATE_UNSUCCESSFUL
.public Object getAttribute(String key)
key
- key of eventpublic String getAllAttributes()
Copyright © 2016. All rights reserved.