|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.coweb.bots.VanillaBot
public abstract class VanillaBot
Implement the Bot interface with nops for all public methods.
| Constructor Summary | |
|---|---|
VanillaBot()
|
|
| Method Summary | |
|---|---|
void |
init()
The bot Proxy will call this method when a new session has been created and a user has subscribed to this bot's service. |
void |
onRequest(Map<String,Object> params,
String replyToken,
String username)
Called when a user make a private request to this bot. |
void |
onShutdown()
Called when the bot service is to shutdown. |
void |
onSubscribe(String username)
Called when a user subscribes to the service provided by this bot. |
void |
onUnsubscribe(String username)
Called when a user unsubscribes to the service provided by this bot. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.coweb.bots.Bot |
|---|
setProxy |
| Constructor Detail |
|---|
public VanillaBot()
| Method Detail |
|---|
public void init()
Bot
init in interface Botpublic void onSubscribe(String username)
Bot
onSubscribe in interface Botusername - The username of the client subscribing.public void onUnsubscribe(String username)
Bot
onUnsubscribe in interface Botusername - The username of the client unsubscribing.
public void onRequest(Map<String,Object> params,
String replyToken,
String username)
Bot
onRequest in interface Botparams - key value pairs of parameters sent by the user.replyToken - token associated with this request. The bot must
pass this token back to the proxy when replying to this request.username - The username of the client making this request.public void onShutdown()
Bot
onShutdown in interface Bot
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||