Package org.sensorhub.api.event
Interface IEventPublisher
- All Superinterfaces:
 Flow.Publisher<Event>
 Interface for event publishers accepting subscriptions of simple listeners
 as well as subscribers with flow control support.
 
- 
Method Summary
Modifier and TypeMethodDescriptionintvoidDispatch event to all subscribersvoidpublish(Event e, BiPredicate<Flow.Subscriber<? super Event>, ? super Event> onDrop) Dispatch event to all subscribers and provide onDrop callback.Methods inherited from interface java.util.concurrent.Flow.Publisher
subscribe 
- 
Method Details
- 
publish
Dispatch event to all subscribers- Parameters:
 e- event to dispatch
 - 
publish
Dispatch event to all subscribers and provide onDrop callback.An event can be dropped by a subscriber when it cannot keep up with the publisher rate and its delivery buffer has reached maximum capacity.
- Parameters:
 e- event to dispatchonDrop- called when event was dropped by a subscriber
 - 
getNumberOfSubscribers
int getNumberOfSubscribers()- Returns:
 - the number of current subscribers
 
 
 -