public class Event extends EventObject
All events have the following attributes in common :-
int and must be unique across the
whole of J2SSH.source| Constructor and Description |
|---|
Event(java.lang.Object source,
int id,
boolean state) |
Event(java.lang.Object source,
int id,
java.lang.Throwable error) |
| Modifier and Type | Method and Description |
|---|---|
Event |
addAttribute(java.lang.String key,
java.lang.Object value)
Add an attribute to the event
|
java.lang.String |
getAllAttributes() |
java.lang.Object |
getAttribute(java.lang.String key)
Get the value of an event attribute
|
int |
getId()
Get the unique event id
|
boolean |
getState()
Get the event state.
|
getSource, toStringpublic Event(java.lang.Object source,
int id,
boolean state)
source - source of eventid - event codeboolean - state true=successful false=unsuccessfulpublic Event(java.lang.Object source,
int id,
java.lang.Throwable error)
public int getId()
public boolean getState()
#STATE_SUCCESSFUL or
#STATE_UNSUCCESSFUL.public java.lang.Object getAttribute(java.lang.String key)
key - key of eventpublic java.lang.String getAllAttributes()
public Event addAttribute(java.lang.String key, java.lang.Object value)
key - key of attributeString - value of attributeCopyright © 2022. All rights reserved.