com.maverick.events
Class Event

java.lang.Object
  extended bycom.maverick.events.EventObject
      extended bycom.maverick.events.Event

public class Event
extends EventObject

Superclass of all events that may be fired during the life of J2SSH.

All events have the following attributes in common :-


Field Summary
 
Fields inherited from class com.maverick.events.EventObject
source
 
Constructor Summary
Event(java.lang.Object source, int id, boolean state)
           
 
Method Summary
 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.
 
Methods inherited from class com.maverick.events.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event(java.lang.Object source,
             int id,
             boolean state)
Parameters:
source - source of event
id - event code
Method Detail

getId

public int getId()
Get the unique event id

Returns:
unique event id

getState

public boolean getState()
Get the event state. May be one of #STATE_SUCCESSFUL or #STATE_UNSUCCESSFUL.

Returns:
event state

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Get the value of an event attribute

Parameters:
key - key of event
Returns:
value

getAllAttributes

public java.lang.String getAllAttributes()

addAttribute

public Event addAttribute(java.lang.String key,
                          java.lang.Object value)
Add an attribute to the event

Parameters:
key - key of attribute
Returns:
this object, to allow event attribute chains


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.