public class ChatLog extends Object implements Comparable<ChatLog>
LivechatChatLogPath
.
It is used to tell update to the chat log event of a chat session. Contains visitor/agent messages, system events and triggers.
You can subscribe to chat log broadcast via DataSource.addChatLogObserver(java.util.Observer)
using ChatLogObserver
This class is a model that will be serialised to JSON and deserialised from JSON to this model. As such it does not follow the m naming prefix for fields.
Modifier and Type | Class and Description |
---|---|
static class |
ChatLog.Type
Definition of available chat log types.
|
Constructor and Description |
---|
ChatLog() |
ChatLog(String displayName,
ChatLog.Type type,
String message)
Constructor for chat log message that allows creation of a local message.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ChatLog chatLog)
Compares two
ChatLog by their time of creation. |
String |
getDisplayName()
Gets display name of the visitor.
|
String |
getMessage()
Gets message body of this chat log event.
|
String |
getNick()
Gets a nick name of the chat log participant.
|
Long |
getTimestamp()
Time record of this event in milliseconds
|
ChatLog.Type |
getType()
Gets type of the chat log message.
|
Integer |
getVisitorQueue()
Gets number of visitors in the queue being currently served in this chat session.
|
Boolean |
isFailed()
Tells if this chat log failed to send
|
Boolean |
isUnverified()
Tells if this chat log event has been received and verified by the server.
|
String |
toString() |
public ChatLog()
public ChatLog(String displayName, ChatLog.Type type, String message)
displayName
- of the visitor/agent or null if unspecifiedtype
- of the message defined in ChatLog.RawType
message
- content or null if nonepublic Long getTimestamp()
public String getNick()
ChatLog.Type
public String getDisplayName()
Display name can be configured using VisitorInfo
via ZopimChat.setVisitorInfo(VisitorInfo)
public ChatLog.Type getType()
Chat log type will be different based on the log event. Eg. it can be a visitor message, system event or a trigger.
See definition of available types are are defined in ChatLog.Type
.
ChatLog.Type.UNKNOWN
if not found or error occurred.public String getMessage()
getType()
public Integer getVisitorQueue()
getType()
public Boolean isUnverified()
public Boolean isFailed()
public int compareTo(ChatLog chatLog)
ChatLog
by their time of creation. This is used for ascending sort of the incoming chat log events.compareTo
in interface Comparable<ChatLog>
chatLog
- to compare with