Package com.pexip.sdk.api
Interface EventSourceFactory
-
- All Implemented Interfaces:
public interface EventSourceFactory
-
-
Method Summary
Modifier and Type Method Description abstract EventSourcecreate(EventSourceListener listener)Creates a new event source and immediately returns it. Flow<Event>asFlow()Converts this EventSourceFactory to a Flow. -
-
Method Detail
-
create
abstract EventSource create(EventSourceListener listener)
Creates a new event source and immediately returns it. Creating an event source initiates an asynchronous process to connect the socket. Once that succeeds or fails,
listenerwill be notified. The caller must cancel the returned event source when it is no longer in use.
-
asFlow
Flow<Event> asFlow()
Converts this EventSourceFactory to a Flow.
- Returns:
a Flow of Events
-
-
-
-