org.enhydra.barracuda.core.event
Interface BaseEvent

All Superinterfaces:
java.lang.Cloneable, StateMap
All Known Implementing Classes:
DefaultBaseEvent

public interface BaseEvent
extends StateMap, java.lang.Cloneable

This interface defines the methods needed to implement a BaseEvent


Field Summary
static java.lang.String EVENT_ID
           
 
Method Summary
 void addListenerID(java.lang.String id)
          Add a specific listener id this event should be delivered to.
 java.lang.String getEventExtension()
          get the event extension
 java.lang.String getEventID()
          Get the ID that identifies this event.
 java.lang.String getEventIDWithExtension()
          Get the id + extension of this event.
 java.util.List getListenerIDs()
          Get the list of id's this event is specifically targeted for.
 BaseEvent getRootEvent()
          get the root event source (may be null)
 java.lang.Object getSource()
          get the event source (may be null)
 long getTimestamp()
          Get the timestamp
 boolean isHandled()
          get the handled status for the event
 void reset()
          Reset the event to it's default state
 void setEventExtension(java.lang.String iext)
          set the event extension
 void setHandled(boolean val)
          mark the event as handled/unhandled
 void setSource(java.lang.Object isource)
          set the source for an event
 void touch()
          Update the timestamp on the event
 
Methods inherited from interface org.enhydra.barracuda.core.util.data.StateMap
getState, getStateKeys, getStateValues, putState, removeState
 

Field Detail

EVENT_ID

public static final java.lang.String EVENT_ID
See Also:
Constant Field Values
Method Detail

setSource

public void setSource(java.lang.Object isource)
set the source for an event

Parameters:
isource - the source for this event

getSource

public java.lang.Object getSource()
get the event source (may be null)

Returns:
the source for this event

getRootEvent

public BaseEvent getRootEvent()
get the root event source (may be null)

Returns:
the root source for this event

setEventExtension

public void setEventExtension(java.lang.String iext)
set the event extension

Parameters:
iext - the target event extension

getEventExtension

public java.lang.String getEventExtension()
get the event extension

Returns:
the target event extension

setHandled

public void setHandled(boolean val)
mark the event as handled/unhandled


isHandled

public boolean isHandled()
get the handled status for the event

Returns:
true if the event is handled

addListenerID

public void addListenerID(java.lang.String id)
Add a specific listener id this event should be delivered to. Events can be targeted to more than one ID.

Parameters:
id - the Listener ID the event should target

getListenerIDs

public java.util.List getListenerIDs()
Get the list of id's this event is specifically targeted for. May return null if there are none.

Returns:
a List of ID's this event is specifically targeting

getEventID

public java.lang.String getEventID()
Get the ID that identifies this event. This will typically be the class name.

Returns:
a string that uniquely identifies this event

getEventIDWithExtension

public java.lang.String getEventIDWithExtension()
Get the id + extension of this event.

Returns:
the id and extension of this event

getTimestamp

public long getTimestamp()
Get the timestamp

Returns:
the last time this event was touched

touch

public void touch()
Update the timestamp on the event


reset

public void reset()
Reset the event to it's default state



Copyright © 2001 Enhydra.org