java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.MulticastEvent
- All Implemented Interfaces:
Serializable,Cloneable
The root event class for all Multicast events.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<MulticastEvent> Common supertype for allMulticastEventevents.static final EventType<MulticastEvent> This event occurs when a multicast message is published.Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, targetFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionMulticastEvent(String name, Object data) Creates a newMulticastEventwith an event type ofPUBLISHED. -
Method Summary
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedMethods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
PUBLISHED
This event occurs when a multicast message is published. -
ANY
Common supertype for allMulticastEventevents.
-
-
Constructor Details
-
MulticastEvent
Creates a newMulticastEventwith an event type ofPUBLISHED.- Parameters:
name- the name of the multicast event.data- the data of the multicast event.
-
-
Method Details
-
getName
Returns the name of the multicast event.- Returns:
- the name of the multicast event.
-
getData
Returns the data of the multicast event cast to the specified type.- Type Parameters:
T- the required type of the multicast data.- Parameters:
type- the required class type of the multicast data.- Returns:
- the multicast data or
nullif none available. - Throws:
NullPointerException- iftypeisnull.ClassCastException- if data is not an instance oftype.
-