|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.almende.eve.agent.Agent
com.almende.eve.agent.example.TestAgent
public class TestAgent
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.almende.eve.agent.example.TestAgentInterface |
---|
TestAgentInterface.STATUS |
Constructor Summary | |
---|---|
TestAgent()
|
Method Summary | |
---|---|
Double |
add(Double a,
Double b)
|
String |
callMyself(String method,
com.fasterxml.jackson.databind.node.ObjectNode params)
|
void |
cancelTask(String id)
|
String |
cascade()
|
Person |
cascade2()
|
void |
complexParameter(Map<String,List<Double>> values)
|
void |
create()
This method is called once in the life time of an agent, at the moment the agent is being created by the AgentFactory. |
String |
createTask(long delay)
|
void |
delete()
This method is called once in the life time of an agent, at the moment the agent is being deleted by the AgentFactory. |
void |
deleteMySelf()
|
void |
destroy()
This method can is called when the agent is uninitialized, and is needed finalize the state of the agent. |
Double |
divide(Double a,
Double b)
|
String |
get(String key)
|
String |
getDescription()
Retrieve a description of the agents functionality |
Object |
getEverything()
|
com.fasterxml.jackson.databind.node.ArrayNode |
getListOfMerlin()
|
Double |
getMarksAvg(Person person)
|
String |
getName(Person person)
|
Person |
getPerson(String name)
|
Set<String> |
getTasks()
|
com.fasterxml.jackson.databind.node.ArrayNode |
getUrlsOfGloria()
|
com.fasterxml.jackson.databind.node.ArrayNode |
getUrlsOfJos()
|
com.fasterxml.jackson.databind.node.ArrayNode |
getUrlsOfMerlin()
|
void |
getUrlsOfMerlinAsync()
|
String |
getVersion()
Retrieve the agents version number |
Double |
increment()
|
void |
init()
This method is called directly after the agent and its state is initiated. |
String |
invalidMethod(String param1,
int param2)
|
void |
methodVersionOne()
|
void |
methodVersionOne(String param)
|
Double |
multiply(Double a,
Double b)
|
void |
myTask(String message)
|
void |
onEvent(String subscriptionId,
String agent,
String event,
com.fasterxml.jackson.databind.node.ObjectNode params)
|
String |
ping(String message,
String sender)
|
void |
pingCallback(com.fasterxml.jackson.databind.node.ObjectNode params)
|
String |
printParams(com.fasterxml.jackson.databind.node.ObjectNode params)
|
void |
put(String key,
String value)
|
void |
registerPingEvent()
|
String |
subscribeToAgent(String url)
|
Double |
subtract(Double a,
Double b)
|
Double |
sum(List<Double> values)
|
Double |
sumArray(Double[] values)
|
Double |
testAgentProxy()
|
Double |
testAgentProxy2()
|
List<Object> |
testAgentProxy3(Boolean asJSON)
|
Double |
testAgentProxy4()
|
void |
testAgentProxy5()
|
void |
testAsyncHTTP()
|
void |
testAsyncXMPP(String url)
|
TestAgentInterface.STATUS |
testEnum(TestAgentInterface.STATUS status)
|
TestAgentInterface.STATUS |
testEnumProxy()
|
TestAgentInterface.STATUS |
testEnumSend()
|
void |
testGetContacts(String url)
|
Object |
testSend(String url,
String method)
|
String |
testSendNonExistingMethod()
|
void |
testSyncXMPP(String url)
|
void |
testVoid()
|
void |
testVoidProxy()
|
void |
throwException()
|
void |
throwJSONRPCException()
|
void |
triggerDataChanged()
|
void |
triggerPingEvent(String message)
|
void |
unregisterPingEvent()
|
void |
unsubscribeFromAgent(String url,
String subscriptionId)
|
void |
xmppConnect(String username,
String password)
|
void |
xmppDisconnect()
|
Methods inherited from class com.almende.eve.agent.Agent |
---|
clear, createAgentProxy, finalize, getAgentFactory, getContext, getId, getMethods, getScheduler, getState, getType, getUrls, onSubscribe, onTrigger, onUnsubscribe, send, send, send, send, sendAsync, sendAsync, setAgentFactory, setState, subscribe, toString, trigger, unsubscribe, unsubscribe |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.almende.eve.agent.AgentInterface |
---|
getId, getMethods, getType, getUrls, onSubscribe, onUnsubscribe |
Constructor Detail |
---|
public TestAgent()
Method Detail |
---|
public String ping(String message, String sender) throws Exception
Exception
public void create()
Agent
create
in class Agent
public void delete()
Agent
delete
in class Agent
public void init()
Agent
init
in class Agent
public void destroy()
Agent
destroy
in class Agent
public String getName(Person person)
public Double getMarksAvg(Person person)
public String callMyself(String method, com.fasterxml.jackson.databind.node.ObjectNode params) throws IOException, JSONRPCException, Exception
IOException
JSONRPCException
Exception
public TestAgentInterface.STATUS testEnum(TestAgentInterface.STATUS status)
testEnum
in interface TestAgentInterface
public TestAgentInterface.STATUS testEnumProxy()
public void testVoid()
testVoid
in interface TestAgentInterface
public void testVoidProxy()
public TestAgentInterface.STATUS testEnumSend() throws Exception
Exception
public String cascade() throws IOException, JSONRPCException, Exception
IOException
JSONRPCException
Exception
public Person cascade2() throws IOException, JSONRPCException, Exception
IOException
JSONRPCException
Exception
public Person getPerson(String name)
public Double add(Double a, Double b)
add
in interface TestAgentInterface
public Double subtract(Double a, Double b)
public Double multiply(Double a, Double b)
multiply
in interface TestAgentInterface
public Double divide(Double a, Double b)
public String printParams(com.fasterxml.jackson.databind.node.ObjectNode params)
public void throwException() throws Exception
Exception
public void throwJSONRPCException() throws Exception
Exception
public Double sum(List<Double> values)
public Double sumArray(Double[] values)
public void complexParameter(Map<String,List<Double>> values)
public Double increment()
increment
in interface TestAgentInterface
public String get(String key)
public void put(String key, String value)
public void registerPingEvent() throws Exception
Exception
public void unregisterPingEvent() throws Exception
Exception
public void pingCallback(com.fasterxml.jackson.databind.node.ObjectNode params)
public void triggerPingEvent(String message) throws Exception
Exception
public void cancelTask(String id)
public String createTask(long delay) throws Exception
Exception
public Set<String> getTasks()
public void myTask(String message) throws Exception
Exception
public Object testSend(String url, String method) throws Exception
Exception
public String testSendNonExistingMethod() throws Exception
Exception
public String subscribeToAgent(String url) throws Exception
Exception
public void unsubscribeFromAgent(String url, String subscriptionId) throws Exception
Exception
public void triggerDataChanged() throws Exception
Exception
public Object getEverything()
public void onEvent(String subscriptionId, String agent, String event, com.fasterxml.jackson.databind.node.ObjectNode params) throws Exception
Exception
public void methodVersionOne()
public void methodVersionOne(String param)
public String invalidMethod(String param1, int param2)
public void testAsyncXMPP(String url) throws Exception
Exception
public void testSyncXMPP(String url) throws Exception
Exception
public void testGetContacts(String url) throws Exception
Exception
public void testAsyncHTTP() throws Exception
Exception
public void xmppConnect(String username, String password) throws Exception
Exception
public void xmppDisconnect() throws Exception
Exception
public void deleteMySelf() throws Exception
Exception
public Double testAgentProxy()
public Double testAgentProxy2()
public List<Object> testAgentProxy3(Boolean asJSON)
public void testAgentProxy5()
public Double testAgentProxy4()
public com.fasterxml.jackson.databind.node.ArrayNode getUrlsOfGloria() throws Exception
Exception
public void getUrlsOfMerlinAsync() throws Exception
Exception
public com.fasterxml.jackson.databind.node.ArrayNode getUrlsOfMerlin() throws Exception
Exception
public com.fasterxml.jackson.databind.node.ArrayNode getUrlsOfJos() throws Exception
Exception
public com.fasterxml.jackson.databind.node.ArrayNode getListOfMerlin() throws Exception
Exception
public String getVersion()
AgentInterface
getVersion
in interface AgentInterface
getVersion
in class Agent
public String getDescription()
AgentInterface
getDescription
in interface AgentInterface
getDescription
in class Agent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |