Event class.
| Modifier and Type | Field and Description |
|---|---|
| public static final EventType | ANY
Common supertype for all event types. |
| protected boolean | consumed
Whether this event has been consumed by any filter or handler. |
| protected EventType | eventType
Type of the event. |
| public static final EventTarget | NULL_SOURCE_TARGET
The constant which represents an unknown event source / target. |
| private static final long | |
| protected transient EventTarget | target
Event target that defines the path through which the event will travel when posted. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Event(final Object
the event source which sent the event source, final EventTarget the event target to associate with the event target, final EventType<? extends Event> the event type eventType)Construct a new |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: a new instance ofEvent with all values copied from
this Event.Overrides java. Creates and returns a copy of this |
| public void | |
| public Event | Returns: the event copy with the new source and targetthe new source of the copied event newSource, final EventTarget the new target of the copied event newTarget)Creates and returns a copy of this event with the specified event source and target. |
| public static void | fireEvent(EventTarget
the target for the event eventTarget, Event the event to fire event)Fires the specified event. |
| public EventType | |
| public EventTarget | |
| public boolean | Returns: true if this Event has been consumed,
false otherwiseIndicates whether this |
| private void |
| ANY | back to summary |
|---|---|
| public static final EventType<Event> ANY Common supertype for all event types. | |
| consumed | back to summary |
|---|---|
| protected boolean consumed Whether this event has been consumed by any filter or handler. | |
| eventType | back to summary |
|---|---|
| protected EventType<? extends Event> eventType Type of the event. | |
| NULL_SOURCE_TARGET | back to summary |
|---|---|
| public static final EventTarget NULL_SOURCE_TARGET The constant which represents an unknown event source / target. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| target | back to summary |
|---|---|
| protected transient EventTarget target Event target that defines the path through which the event will travel when posted. | |
| Event | back to summary |
|---|---|
| public Event(final EventType<? extends Event> eventType) Construct a new | |
| Event | back to summary |
|---|---|
| public Event(final Object source, final EventTarget target, final EventType<? extends Event> eventType) Construct a new
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Creates and returns a copy of this | |
| consume | back to summary |
|---|---|
| public void consume() Marks this | |
| copyFor | back to summary |
|---|---|
| public Event copyFor(final Object newSource, final EventTarget newTarget) Creates and returns a copy of this event with the specified event source
and target. If the source or target is set to
| |
| fireEvent | back to summary |
|---|---|
| public static void fireEvent(EventTarget eventTarget, Event event) Fires the specified event. The given event target specifies the path through which the event will travel.
| |
| getEventType | back to summary |
|---|---|
| public EventType Gets the event type of this event. Objects of the same | |
| getTarget | back to summary |
|---|---|
| public EventTarget getTarget() Returns the event target of this event. The event target specifies the path through which the event will travel when posted.
| |
| isConsumed | back to summary |
|---|---|
| public boolean isConsumed() Indicates whether this
| |
| readObject | back to summary |
|---|---|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
| |