Package cl.obcom.desktopfx.core
Class MulticastEvent
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
Modifier and TypeFieldDescriptionstatic final EventType
<MulticastEvent> Common supertype for allMulticastEvent
events.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, target
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionMulticastEvent
(String name, Object data) Creates a newMulticastEvent
with an event type ofPUBLISHED
. -
Method Summary
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
PUBLISHED
This event occurs when a multicast message is published. -
ANY
Common supertype for allMulticastEvent
events.
-
-
Constructor Details
-
MulticastEvent
Creates a newMulticastEvent
with 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
null
if none available. - Throws:
NullPointerException
- iftype
isnull
.ClassCastException
- if data is not an instance oftype
.
-