Class MulticastEvent

java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.MulticastEvent
All Implemented Interfaces:
Serializable, Cloneable

public class MulticastEvent extends Event
The root event class for all Multicast events.
See Also:
  • Field Details

    • PUBLISHED

      public static final EventType<MulticastEvent> PUBLISHED
      This event occurs when a multicast message is published.
    • ANY

      public static final EventType<MulticastEvent> ANY
      Common supertype for all MulticastEvent events.
  • Constructor Details

    • MulticastEvent

      public MulticastEvent(String name, Object data)
      Creates a new MulticastEvent with an event type of PUBLISHED.
      Parameters:
      name - the name of the multicast event.
      data - the data of the multicast event.
  • Method Details

    • getName

      public final String getName()
      Returns the name of the multicast event.
      Returns:
      the name of the multicast event.
    • getData

      public final <T> T getData(Class<T> type)
      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 - if type is null.
      ClassCastException - if data is not an instance of type.