Interface DataSource
-
- All Known Implementing Classes:
- PathDataSource
public interface DataSource
Interface definition of chat data source. It allows data retrieval and subscription to data change broadcasts.
-
-
Method Summary
-
-
-
Method Detail
-
deleteObservers
void deleteObservers()
Removes all observers from all data paths
-
clear
void clear()
Clear all data source.This will clear each data path
-
getConnection
Connection getConnection()
Gets connection object from theConnectionPath
- Returns:
- connection pojo
- See Also:
ConnectionPath.getData()
,Connection
-
getProfile
Profile getProfile()
Gets profile object from theLivechatProfilePath
- Returns:
- profile pojo
- See Also:
LivechatProfilePath.getData()
,Profile
-
getAgents
java.util.LinkedHashMap<java.lang.String,Agent> getAgents()
Gets agents in the current chat. Agents are defined inLivechatAgentsPath
- Returns:
- agents and their ID
- See Also:
LivechatAgentsPath.getData()
,Agent
-
getDepartments
java.util.Map<java.lang.String,Department> getDepartments()
Gets departments from theLivechatDepartmentsPath
- Returns:
- departments and their ID
- See Also:
LivechatDepartmentsPath.getData()
,Department
-
getAccount
Account getAccount()
Gets account object from theLivechatAccountPath
- Returns:
- account pojo
- See Also:
LivechatAccountPath.getData()
,Account
-
getChatLog
java.util.LinkedHashMap<java.lang.String,ChatLog> getChatLog()
Gets messages from theLivechatChatLogPath
- Returns:
- messages and their ID
- See Also:
LivechatChatLogPath.getData()
,ChatLog
-
getForms
Forms getForms()
Gets forms from theLivechatFormsPath
- Returns:
- forms model
- See Also:
LivechatFormsPath.getData()
,Forms
-
getFileSending
FileSending getFileSending()
Gets file sending model from theLivechatFileSendingPath
- Returns:
- file sending model
- See Also:
LivechatFileSendingPath.getData()
,FileSending
-
getChattingStatus
ChattingStatus getChattingStatus()
Gets the current chatting status- Returns:
ChattingStatus
enum
-
addConnectionObserver
ObservableTrigger addConnectionObserver(ConnectionObserver observer)
Adds observer to theConnectionPath
Observer will be registered for broadcast updates on
Connection
. You can registerConnectionObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addProfileObserver
ObservableTrigger addProfileObserver(ProfileObserver observer)
Adds observer to theLivechatProfilePath
Observer will be registered for broadcast updates on
Profile
. You can registerProfileObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addAgentsObserver
ObservableTrigger addAgentsObserver(AgentsObserver observer)
Adds observer to theLivechatAgentsPath
Observer will be registered for broadcast updates on
Agent
. You can registerAgentsObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addDepartmentsObserver
ObservableTrigger addDepartmentsObserver(DepartmentsObserver observer)
Adds observer to theLivechatDepartmentsPath
Observer will be registered for broadcast updates on
Department
. You can registerDepartmentsObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addAccountObserver
ObservableTrigger addAccountObserver(AccountObserver observer)
Adds observer to theLivechatAccountPath
Observer will be registered for broadcast updates on
Account
. You can registerAccountObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addFormsObserver
ObservableTrigger addFormsObserver(FormsObserver observer)
Adds observer to theLivechatFormsPath
Observer will be registered for broadcast updates on
Forms
. You can registerFormsObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addFileSendingObserver
ObservableTrigger addFileSendingObserver(FileSendingObserver observer)
Adds observer to theLivechatFileSendingPath
Observer will be registered for broadcast updates on
FileSending
. You can registerFileSendingObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addChattingStatusObserver
ObservableTrigger addChattingStatusObserver(ChattingStatusObserver observer)
Adds an observer to theLivechatChattingStatusPath
.Observer will be registered for broadcast updates on
LivechatChattingStatusPath
. You can registerFileSendingObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addChatLogObserver
ObservableTrigger addChatLogObserver(ChatLogObserver observer)
Adds observer to theLivechatChatLogPath
Observer will be registered for broadcast updates on
ChatLog
. You can registerChatLogObserver
orObserver
.- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
deleteConnectionObserver
void deleteConnectionObserver(ConnectionObserver observer)
Deletes observer from theConnectionPath
- Parameters:
observer
- to remove
-
deleteProfileObserver
void deleteProfileObserver(ProfileObserver observer)
Deletes observer from theLivechatProfilePath
- Parameters:
observer
- to remove
-
deleteAgentsObserver
void deleteAgentsObserver(AgentsObserver observer)
Deletes observer from theLivechatAgentsPath
- Parameters:
observer
- to remove
-
deleteAccountObserver
void deleteAccountObserver(AccountObserver observer)
Deletes observer from theLivechatAccountPath
- Parameters:
observer
- to remove
-
deleteDepartmentsObserver
void deleteDepartmentsObserver(DepartmentsObserver observer)
Deletes observer from theLivechatDepartmentsPath
- Parameters:
observer
- to remove
-
deleteChatLogObserver
void deleteChatLogObserver(ChatLogObserver observer)
Deletes observer from theLivechatDepartmentsPath
- Parameters:
observer
- to remove
-
deleteFormsObserver
void deleteFormsObserver(FormsObserver observer)
Deletes observer from theLivechatFormsPath
- Parameters:
observer
- to remove
-
deleteFileSendingObserver
void deleteFileSendingObserver(FileSendingObserver observer)
Deletes observer from theLivechatFileSendingPath
- Parameters:
observer
- to remove
-
deleteChattingStatusObserver
void deleteChattingStatusObserver(ChattingStatusObserver observer)
Deletes observer from theLivechatChattingStatusPath
- Parameters:
observer
- to remove
-
-