org.avis.client
Class AvisEventObject

java.lang.Object
  extended by java.util.EventObject
      extended by org.avis.client.AvisEventObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GeneralNotificationEvent, NotificationEvent

public abstract class AvisEventObject
extends EventObject

Extends java.util.EventObject to add useful utilities such as general data association.

Author:
Matthew Phillips
See Also:
Serialized Form

Constructor Summary
AvisEventObject(Object source)
          Create a new instance.
AvisEventObject(Object source, Map<String,Object> data)
          Create a new instance.
 
Method Summary
 Object getData(String key)
          Get some data previously associated with the event.
 void setData(String key, Object value)
          Set some generic data associated with the event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AvisEventObject

public AvisEventObject(Object source)
Create a new instance.

Parameters:
source -

AvisEventObject

public AvisEventObject(Object source,
                       Map<String,Object> data)
Create a new instance.

Parameters:
source - The event source.
data - The initial associated data.
Method Detail

setData

public void setData(String key,
                    Object value)
Set some generic data associated with the event.

See Also:
getData(String)

getData

public Object getData(String key)
Get some data previously associated with the event.

Returns:
The data, or null if none set for the key.
See Also:
setData(String, Object)


Copyright © 2008 Matthew Phillips. All Rights Reserved.