public class WebSocketClient extends Object
Constructor and Description |
---|
WebSocketClient(String companyId,
OAuthConnection connection) |
Modifier and Type | Method and Description |
---|---|
SocketSubscription |
consumeEvents(Consumer<EventResponse> consumer)
Assign a event consumer to a web socket and get back a socket subscription.
|
SocketSubscription |
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.
|
SocketSubscription |
consumeEvents(Consumer<EventResponse> consumer,
Set<EventType> eventTypes)
Assign a event consumer to a web socket with filtering for event types
and get back a socket subscription.
|
SocketSubscription |
consumeTasks(Consumer<TaskResponse> consumer)
Assign a task consumer to a web socket and get back a socket subscription.
|
SocketSubscription |
consumeTasks(Consumer<TaskResponse> consumer,
TaskFilter taskFilter)
Assign a task consumer to a web socket with custom filtering for tasks
and get back a socket subscription
|
public WebSocketClient(String companyId, OAuthConnection connection)
public SocketSubscription consumeEvents(Consumer<EventResponse> consumer)
consumer
- Consumer
of EventResponse
callback functionSocketSubscription
socket subscriptionpublic SocketSubscription consumeEvents(Consumer<EventResponse> consumer, Set<EventType> eventTypes)
consumer
- Consumer
of EventResponse
callback functioneventTypes
- Set
of EventType
event typeSocketSubscription
socket subscriptionpublic SocketSubscription consumeEvents(Consumer<EventResponse> consumer, EventFilter eventFilter)
consumer
- Consumer
of EventResponse
callback functioneventFilter
- EventFilter
event filterWebSocketClient
socket subscriptionpublic SocketSubscription consumeTasks(Consumer<TaskResponse> consumer)
consumer
- Consumer
of TaskResponse
callback functionSocketSubscription
socket subscriptionpublic SocketSubscription consumeTasks(Consumer<TaskResponse> consumer, TaskFilter taskFilter)
consumer
- Consumer
of TaskResponse
callback functiontaskFilter
- Optional
of TaskFilter
task filterSocketSubscription
socket subscriptionCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.