public interface EventConsumer
Title: Service Event Fabric Core
Description: Defines an Event Consumer capable of receiving an Event Datagram.
class MyListener implements FabricEventListener { public void onEvent(ImmmutableEventDatagram event) throws EventDispatcherException { System.out.prinln("Event: " + event.getEventId()); } } ... EventConsumer consumer = dispatcher.createEventConsumer("Consumer", new MyListener(), "event.id", null, EventScope.OBSERVABLE, true); ... consumer.close();
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the consumer and drops it from the corresponding dispatcher.
|
DispatchMode |
getDispatchMode()
Returns a dispatch mode of the consumer.
|
java.lang.String |
getEventFilter()
Returns the event filter associated with the consumer.
|
FabricEventListener |
getEventListener()
Returns the event listener associated with the consumer.
|
EventScope |
getEventScope()
Returns an event scope of the consumer.
|
java.lang.String |
getEventSelector()
Returns the event selector associated with the consumer.
|
java.lang.String |
getGroupName()
Returns a name of the group to which the consumer belongs.
|
java.lang.String |
getName()
Returns a name of the consumer.
|
boolean |
noLocal()
Checks if the consumer will not process events raised by the owning dispatcher.
|
void |
setEventListener(FabricEventListener eventListener)
Sets the event listener associated with the consumer.
|
void |
setEventSelector(java.lang.String eventSelector)
Sets the event selector associated with the consumer.
|
java.lang.String getName()
FabricEventListener getEventListener()
void setEventListener(FabricEventListener eventListener)
eventListener
- the event listener to be set.java.lang.String getEventFilter()
Filter
for detailed information about filters.java.lang.String getEventSelector()
EventDispatcher
for details.
null
means that the consumer has no selector.void setEventSelector(java.lang.String eventSelector) throws EventSelectorFormatException
EventDispatcher
for details.
null
means that the consumer has no selector.eventSelector
- the selector to be set.EventSelectorFormatException
- if the selector format is wrong.DispatchMode getDispatchMode()
EventScope getEventScope()
boolean noLocal()
true
the consumer will not process events raised by the owning dispatcher, false
otherwise.java.lang.String getGroupName()
null
.null
if the consumer is not a group consumer.void close()
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.