Class WebSocketClient
java.lang.Object
com.iland.core.web.sdk.connection.WebSocketClient
Web Socket Client.
- Author:
- Nick Kasprzak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconsumeEvents(Consumer<EventResponse> consumer) Assign a event consumer to a web socket and get back a socket subscription.consumeEvents(Consumer<EventResponse> consumer, EventFilter eventFilter) Assign a event consumer to a web socket with custom filtering for events and get back a socket subscription.consumeEvents(Consumer<EventResponse> consumer, Set<EventTypeResponse> eventTypes) Assign a event consumer to a web socket with filtering for event types and get back a socket subscription.consumeTasks(Consumer<com.iland.core.web.rest.response.task.TaskResponse> consumer) Assign a task consumer to a web socket and get back a socket subscription.consumeTasks(Consumer<com.iland.core.web.rest.response.task.TaskResponse> consumer, TaskFilter taskFilter) Assign a task consumer to a web socket with custom filtering for tasks and get back a socket subscription
-
Constructor Details
-
WebSocketClient
-
-
Method Details
-
consumeEvents
Assign a event consumer to a web socket and get back a socket subscription.- Parameters:
consumer-ConsumerofEventResponsecallback function- Returns:
SocketSubscriptionsocket subscription
-
consumeEvents
public SocketSubscription consumeEvents(Consumer<EventResponse> consumer, Set<EventTypeResponse> eventTypes) Assign a event consumer to a web socket with filtering for event types and get back a socket subscription.- Parameters:
consumer-ConsumerofEventResponsecallback functioneventTypes-SetofEventTypeResponseevent type- Returns:
SocketSubscriptionsocket subscription
-
consumeEvents
Assign a event consumer to a web socket with custom filtering for events and get back a socket subscription.- Parameters:
consumer-ConsumerofEventResponsecallback functioneventFilter-EventFilterevent filter- Returns:
WebSocketClientsocket subscription
-
consumeTasks
public SocketSubscription consumeTasks(Consumer<com.iland.core.web.rest.response.task.TaskResponse> consumer) Assign a task consumer to a web socket and get back a socket subscription.- Parameters:
consumer-ConsumerofTaskResponsecallback function- Returns:
SocketSubscriptionsocket subscription
-
consumeTasks
public SocketSubscription consumeTasks(Consumer<com.iland.core.web.rest.response.task.TaskResponse> consumer, TaskFilter taskFilter) Assign a task consumer to a web socket with custom filtering for tasks and get back a socket subscription- Parameters:
consumer-ConsumerofTaskResponsecallback functiontaskFilter-OptionalofTaskFiltertask filter- Returns:
SocketSubscriptionsocket subscription
-