Class EventBusSubscriptionDefinition<E extends Event>
java.lang.Object
io.vertigo.core.node.definition.AbstractDefinition<EventBusSubscriptionDefinition>
io.vertigo.commons.eventbus.definitions.EventBusSubscriptionDefinition<E>
- Type Parameters:
E- type of event
- All Implemented Interfaces:
io.vertigo.core.node.definition.Definition
public final class EventBusSubscriptionDefinition<E extends Event>
extends io.vertigo.core.node.definition.AbstractDefinition<EventBusSubscriptionDefinition>
This defintion defines a subscripter in the eventbus pattern.
A endpoint is :
- a type of event
- a way to consume the event.
- Author:
- pchretien
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the consumer of the eventbooleanReturn if an event matches the event type of the actual subscriptionMethods inherited from class io.vertigo.core.node.definition.AbstractDefinition
idMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertigo.core.node.definition.Definition
getName
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
EventBusSubscriptionDefinition
Constructor- Parameters:
name- the name (must be unique)eventType- the type of event subscribedeventListener- the consumer of the event (what will be done with it)
-
-
Method Details
-
match
Return if an event matches the event type of the actual subscription- Parameters:
event- the type of event to test- Returns:
- true if it matches
-
getListener
Return the consumer of the event- Returns:
- the consumer
-
getEventType
-