|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.almende.eve.transport.xmpp.AgentConnection
public class AgentConnection
Constructor Summary | |
---|---|
AgentConnection(AgentFactory agentFactory)
|
Method Summary | |
---|---|
void |
connect(String agentId,
String host,
Integer port,
String serviceName,
String username,
String password,
String resource)
Login and connect the agent to the messaging service |
void |
disconnect()
Disconnect the agent from the messaging service |
String |
getAgentId()
Get the id of the agent linked to this connection |
String |
getResource()
Get the resource of the connection. |
String |
getUsername()
Get the username of the connection (without host) |
boolean |
isConnected()
Check whether the agent is connected to the messaging service |
void |
send(String username,
JSONRequest request,
AsyncCallback<JSONResponse> callback)
Send a message to an other agent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentConnection(AgentFactory agentFactory)
Method Detail |
---|
public String getAgentId()
public String getUsername()
public String getResource()
public void connect(String agentId, String host, Integer port, String serviceName, String username, String password, String resource) throws Exception
agentId
- host
- port
- serviceName
- username
- password
- resource
- optional
Exception
public void disconnect()
public boolean isConnected()
public void send(String username, JSONRequest request, AsyncCallback<JSONResponse> callback) throws Exception
username
- message
-
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |