public static interface AcsEventSubscriber.Callback<U>
This ACS-defined interface replaces the runtime search for the old "Consumer#receive(...)" method that was based on Java introspection.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<U> |
getEventType()
This method is needed for adding event-specific subscriptions
and for the type-safety of this API (based on java generics),
and should be implemented like
|
void |
receive(U eventData,
EventDescription eventDescrip)
Event delivery, from the framework to user code.
|
void receive(U eventData, EventDescription eventDescrip)
eventData - The event data, e.g. an IDL-defined struct.eventDescrip - Event meta data.java.lang.Class<U> getEventType()
public Class<MyEvent> getEventType() {
return MyEvent.class;
}