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(Object source,
int id,
boolean state) |
| Modifier and Type | Method and Description |
|---|---|
Event |
addAttribute(String key,
Object value)
Add an attribute to the event
|
String |
getAllAttributes() |
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, toStringpublic 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 © 2014. All rights reserved.