ChatThreadsHandler

public interface ChatThreadsHandler

Instance that allows modification, manipulation and observing of threads.

Some methods of this class depend on configuration sent from the server. If the configuration changes remotely, you need to call ChatBuilder.build again and use the newly created instance. The saved configuration will never change at run-time.

There are no effects attached to initialization of this class.

Types

Link copied to clipboard
public interface OnThreadsUpdatedListener

Listener which allows the user to subscribe to thread list changes.

Functions

Link copied to clipboard

Creates a new thread -if permitted by the configuration- and returns a handler for it. threads should return this new instance even if it's not created on the server yet.

public ChatThreadHandler create(Map<String, String> customFields)
public ChatThreadHandler create(Sequence<PreChatSurveyResponse<? extends FieldDefinition, ? extends Object>> preChatSurveyResponse)
public abstract ChatThreadHandler create(Map<String, String> customFields, Sequence<PreChatSurveyResponse<? extends FieldDefinition, ? extends Object>> preChatSurveyResponse)

Creates a new thread -if permitted by configuration- and returns a handler for it. threads should return this new instance even if it's not created on the server yet.

Link copied to clipboard
public abstract PreChatSurvey getPreChatSurvey()

A pre-chat form which should be answered by the user before create is called. Answers have to be supplied as custom fields in the create call.

Link copied to clipboard
public abstract Unit refresh()

Sends a request to refresh the thread-list.

Link copied to clipboard
public abstract ChatThreadHandler thread(ChatThread thread)

Creates a new thread handler with given thread. thread is used as a template and this particular instance will not be updated in response to changes in the handler.

Link copied to clipboard

Registers a listeners on this instance that returns new value every time client calls refresh or server imperatively forces a refresh remotely.