|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.openbp.jaspira.event.JaspiraEvent
public class JaspiraEvent
A client event represents a high level event in the Jaspira framework. It contains Informations about the source, kind of event and if possible the original event created by a java component.
| Field Summary | |
|---|---|
static int |
CONSUMED
Event status flag: The event has been consumed by a listener |
static int |
HANDELED
Event status flag: The event has been handled by at least one listener |
static int |
STACKABLE
Event flag: The event can be stacked with events of the same type. |
static int |
TYPE_BOTTOM_UP
Event type: Bottom up event (passed from child to parent) |
static int |
TYPE_DIRECT
Event type: Handle by target plugin only (does not get passed to other plugins) |
static int |
TYPE_FLOOD
Event type: Flood event (passed to all children, then to parent - the most common event type) |
static int |
TYPE_GLOBAL
Event type: Global event, passed only to the JaspiraEventMgr |
static int |
UNCONSUMABLE
Event flag: An unconsumable event that can't be consumed by a listener |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
JaspiraEvent(Plugin source,
java.lang.String eventName)
Creates a standard event with no data object, flood passing mode, application level and no flags. |
|
JaspiraEvent(Plugin source,
java.lang.String eventName,
int type,
int level)
Creates an event with the given level and type and no data object. |
|
JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object)
Creates an application wide flood event with the given data object. |
|
JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object,
int type,
int level)
Creates an event with the given level, type and data object. |
|
JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object,
int type,
int level,
int flags)
Creates a new event with all possible parameters. |
|
| Method Summary | |
|---|---|
void |
brand(Plugin brand)
Sets the brand. |
Plugin |
getBrand()
Gets the brand. |
java.lang.String |
getEventGroup()
Returns the event group. |
java.lang.String |
getEventName()
Gets event name. |
int |
getFlags()
Gets the event flags. |
int |
getLevel()
Returns the propagation level up to which this event is to be passed. |
java.lang.Object |
getObject()
Gets the event object. |
java.util.EventObject |
getOriginalEvent()
Gets the original event. |
Plugin |
getSourcePlugin()
Gets source plug in. |
java.lang.String |
getTargetClassName()
Gets the classs name of possible receivers of this event. |
java.lang.String |
getTargetPluginId()
Gets the plugin id of the receiver plugin of this event. |
int |
getType()
Returns the event type. |
boolean |
isConsumed()
Checks if the event has been consumed by a listener. |
boolean |
isStackable()
Checks if the event can be stacked. |
boolean |
isUnconsumable()
Checks if the event is unconsumable. |
void |
setObject(java.lang.Object object)
Sets the event object. |
void |
setTargetClassName(java.lang.String targetClassName)
Sets the classs name of possible receivers of this event. |
void |
setTargetPluginId(java.lang.String targetPluginId)
Sets the plugin id of the receiver plugin of this event. |
java.lang.String |
toString()
Returns a String which describes the object. |
void |
updateFlags(int flag)
Updates the event flags. |
boolean |
updateFlags(JaspiraEventHandlerCode returnCode)
Updates the event flags using the given module event handler return code. |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_DIRECT
public static final int TYPE_BOTTOM_UP
public static final int TYPE_FLOOD
public static final int TYPE_GLOBAL
JaspiraEventMgr
public static final int UNCONSUMABLE
public static final int STACKABLE
public static final int CONSUMED
public static final int HANDELED
| Constructor Detail |
|---|
public JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object,
int type,
int level,
int flags)
source - The plugin that dispatches this event. Must not be null.
Will be converted to lower case.eventName - The name of the eventobject - An additional data object. Can be null.type - The type of the event (i\.e\. the mode of passing the event).level - The top level for passing of this eventflags - Flags for this event
public JaspiraEvent(Plugin source,
java.lang.String eventName)
public JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object)
public JaspiraEvent(Plugin source,
java.lang.String eventName,
int type,
int level)
public JaspiraEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object,
int type,
int level)
| Method Detail |
|---|
public java.util.EventObject getOriginalEvent()
public Plugin getSourcePlugin()
public java.lang.String getEventName()
public int getFlags()
public boolean isUnconsumable()
public boolean isConsumed()
public boolean isStackable()
public void updateFlags(int flag)
flag - Flag bits to setpublic boolean updateFlags(JaspiraEventHandlerCode returnCode)
returnCode - Event handler return code
(EventModule.EVENT_HANDLED/EventModule.EVENT_IGNORED/EventModule.EVENT_CONSUMED)
public int getType()
TYPE_DIRECT/TYPE_BOTTOM_UP/TYPE_FLOOD/TYPE_GLOBALpublic int getLevel()
Plugin.LEVEL_APPLICATION/Plugin.LEVEL_FRAME/
Plugin.LEVEL_PAGE/Plugin.LEVEL_PLUGINpublic java.lang.Object getObject()
public void setObject(java.lang.Object object)
object - The object to pass along with this event or nullpublic java.lang.String getTargetClassName()
public void setTargetClassName(java.lang.String targetClassName)
targetClassName - The class name or null if the event is not directed to a particular type of pluginpublic java.lang.String getTargetPluginId()
public void setTargetPluginId(java.lang.String targetPluginId)
targetPluginId - The plugin id or null if the event is not directed to a particular pluginpublic java.lang.String toString()
toString in class java.util.EventObjectpublic Plugin getBrand()
public void brand(Plugin brand)
public java.lang.String getEventGroup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||