|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.coweb.bots.transport.Transport
public abstract class Transport
Abstract base class for new transport implementations between coweb server and service bots. Instantiated per service bot instance per session.
| Field Summary | |
|---|---|
protected org.cometd.bayeux.server.BayeuxServer |
bayeuxServer
|
protected Map<String,Object> |
botConfig
Contains bot configuration options and metadata. |
protected org.cometd.bayeux.server.ServerSession |
server
|
protected String |
serviceName
Name of the service provided by the bot communicating via this transport. |
protected String |
sessionId
Unique ID of the session to which the transport is bridging its bot |
| Constructor Summary | |
|---|---|
protected |
Transport()
|
|
Transport(Map<String,Object> botConfig,
String sessionId)
|
| Method Summary | |
|---|---|
org.cometd.bayeux.server.ServerChannel |
getResponseChannel()
|
org.cometd.bayeux.server.ServerSession |
getServer()
|
String |
getServiceName()
|
abstract void |
init()
The coweb server calls this method when a session decides to launch a service bot using this transport. |
void |
setBayeuxServer(org.cometd.bayeux.server.BayeuxServer bayeuxServer)
|
void |
setBotConfig(Map<String,Object> botConfig)
|
void |
setSessionId(String sessionId)
|
abstract void |
shutdown()
The coweb server calls this method when a session decides to shut down the service bot using this transport. |
abstract boolean |
subscribeUser(org.cometd.bayeux.server.ServerSession client,
boolean pub)
The coweb server calls this method when a coweb application subscribes to the service bot using this transport. |
abstract boolean |
unsubscribeUser(org.cometd.bayeux.server.ServerSession client,
boolean pub)
The coweb server calls this method when a coweb application unsubscribes from the service bot using this transport. |
abstract boolean |
userRequest(org.cometd.bayeux.server.ServerSession client,
org.cometd.bayeux.Message message)
The coweb server calls this method when a coweb application sends a private request to the service bot using this transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Object> botConfig
protected String serviceName
protected String sessionId
protected org.cometd.bayeux.server.BayeuxServer bayeuxServer
protected org.cometd.bayeux.server.ServerSession server
| Constructor Detail |
|---|
protected Transport()
public Transport(Map<String,Object> botConfig,
String sessionId)
| Method Detail |
|---|
public void setBotConfig(Map<String,Object> botConfig)
public String getServiceName()
public org.cometd.bayeux.server.ServerSession getServer()
public void setSessionId(String sessionId)
public void setBayeuxServer(org.cometd.bayeux.server.BayeuxServer bayeuxServer)
public org.cometd.bayeux.server.ServerChannel getResponseChannel()
public abstract void init()
public abstract boolean subscribeUser(org.cometd.bayeux.server.ServerSession client,
boolean pub)
throws IOException
client - instance representing the application that sent the messagemessage - instance representing the service subscription messagepub - True iff subscribing to the bot's public broadcast channel
IOException - When the transport experiences a failure delivering
the message
public abstract boolean unsubscribeUser(org.cometd.bayeux.server.ServerSession client,
boolean pub)
throws IOException
client - instance representing the application that sent the messagemessage - instance representing the service subscription messagepub - True iff subscribing to the bot's public broadcast channel
IOException - When the transport experiences a failure delivering
the message
public abstract boolean userRequest(org.cometd.bayeux.server.ServerSession client,
org.cometd.bayeux.Message message)
throws IOException
client - instance representing the application that sent the messagemessage - instance representing the service subscription message
IOException - When the transport experiences a failure delivering
the messagepublic abstract void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||