public class MulticastEvent extends Event
Modifier and Type | Field and Description |
---|---|
static EventType<MulticastEvent> |
ANY
Common supertype for all
MulticastEvent events. |
static EventType<MulticastEvent> |
PUBLISHED
This event occurs when a multicast message is published.
|
consumed, eventType, NULL_SOURCE_TARGET, target
source
Constructor and Description |
---|
MulticastEvent(String name,
Object data)
Creates a new
MulticastEvent with an event type of PUBLISHED . |
Modifier and Type | Method and Description |
---|---|
<T> T |
getData(Class<T> type)
Returns the data of the multicast event cast to the specified type.
|
String |
getName()
Returns the name of the multicast event.
|
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
getSource, toString
public static final EventType<MulticastEvent> PUBLISHED
public static final EventType<MulticastEvent> ANY
MulticastEvent
events.public final String getName()
public final <T> T getData(Class<T> type)
T
- the required type of the multicast data.type
- the required class type of the multicast data.null
if none available.NullPointerException
- if type
is null
.ClassCastException
- if data is not an instance of type
.Copyright © OBCOM INGENIERIA S.A. (Chile). All Rights Reserved.