|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.botlibre.sdk.LiveChatConnection
public class LiveChatConnection
Connection class for a Live Chat, or chatroom connection. A live chat connection is different than an SDKConnection as it is asynchronous, and uses web sockets for communication.
Constructor Summary | |
---|---|
LiveChatConnection(Credentials credentials,
LiveChatListener listener)
Create a new connection with the application credentials and the listener. |
Method Summary | |
---|---|
void |
accept()
Accept a private request. |
void |
boot(java.lang.String user)
Boot a user from the channel. |
void |
connect(ChannelConfig channel,
UserConfig user)
Connection to the live chat server channel. |
void |
disconnect()
Disconnect from the channel. |
void |
exit()
Exit from the current private channel. |
ChannelConfig |
getChannel()
Return the current channel. |
Credentials |
getCredentials()
Return the current application credentials. |
LiveChatListener |
getListener()
|
UserConfig |
getUser()
Return the current user. |
boolean |
isDebug()
|
boolean |
isKeepAlive()
Return if the connection will be kept alive, and not allowed to timeout due to inactivity. |
void |
ping()
Test the connection. |
void |
pvt(java.lang.String user)
Request a private chat session with a user. |
void |
sendMessage(java.lang.String message)
Sent a text message to the channel. |
void |
setDebug(boolean debug)
Enable debugging messages (logged to System.out). |
void |
setKeepAlive(boolean keepAlive)
Set if the connection should be kept alive, and not allowed to timeout due to inactivity. |
void |
setListener(LiveChatListener listener)
|
void |
whisper(java.lang.String user,
java.lang.String message)
Send a private message to a user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LiveChatConnection(Credentials credentials, LiveChatListener listener)
Method Detail |
---|
public void connect(ChannelConfig channel, UserConfig user)
public void sendMessage(java.lang.String message)
public void accept()
public void ping()
public void exit()
public void pvt(java.lang.String user)
public void boot(java.lang.String user)
public void whisper(java.lang.String user, java.lang.String message)
public void disconnect()
public boolean isDebug()
public void setDebug(boolean debug)
public ChannelConfig getChannel()
public UserConfig getUser()
public Credentials getCredentials()
public LiveChatListener getListener()
public void setListener(LiveChatListener listener)
public boolean isKeepAlive()
public void setKeepAlive(boolean keepAlive)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |