public interface EventStream
extends java.lang.AutoCloseable
Event
; for each message a bunch of
EventListener
will be recalled and notified with it.Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventListener listener)
Adds a listener.
|
void |
close()
Closes this Stream; Events will not be posted to listeners after this call.
|
int |
getListenerCount()
Helper method that returns the current number of subscribed listeners.
|
boolean |
isEventStreamClosed()
Helper method to check if the stream is able to receive Events.
|
void |
removeEventListener(EventListener listener)
Removes a listener.
|
void addEventListener(EventListener listener)
listener
- Reference to the class that implements EventListener
.void removeEventListener(EventListener listener)
listener
- Reference to the class that implements EventListener
.int getListenerCount()
boolean isEventStreamClosed()
void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
- in case of an error when closing the session