com.almende.eve.agent.example
Class ManagementAgent

java.lang.Object
  extended by com.almende.eve.agent.Agent
      extended by com.almende.eve.agent.example.ManagementAgent
All Implemented Interfaces:
AgentInterface

public class ManagementAgent
extends Agent


Constructor Summary
ManagementAgent()
           
 
Method Summary
 List<String> create(String id, String type)
          Create a new agent.
 void delete(String id)
          Delete an agent
 boolean exists(String id)
          Test if an agent exists
 List<String> get(String id)
          Retrieve an agents urls.
 String getDescription()
          Retrieve a description of the agents functionality
 String getVersion()
          Retrieve the agents version number
 
Methods inherited from class com.almende.eve.agent.Agent
clear, create, createAgentProxy, delete, destroy, finalize, getAgentFactory, getContext, getId, getMethods, getScheduler, getState, getType, getUrls, init, 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
 

Constructor Detail

ManagementAgent

public ManagementAgent()
Method Detail

create

public List<String> create(String id,
                           String type)
                    throws Exception
Create a new agent. Will throw an exception if the agent already exists

Parameters:
id -
type -
Returns:
urls
Throws:
Exception

delete

public void delete(String id)
            throws Exception
Delete an agent

Parameters:
id -
Throws:
Exception

get

public List<String> get(String id)
                 throws Exception
Retrieve an agents urls. If the agent does not exist, null will be returned.

Parameters:
id -
Returns:
urls
Throws:
Exception

exists

public boolean exists(String id)
               throws Exception
Test if an agent exists

Parameters:
id -
Returns:
exists
Throws:
Exception

getDescription

public String getDescription()
Description copied from interface: AgentInterface
Retrieve a description of the agents functionality

Specified by:
getDescription in interface AgentInterface
Specified by:
getDescription in class Agent
Returns:
description

getVersion

public String getVersion()
Description copied from interface: AgentInterface
Retrieve the agents version number

Specified by:
getVersion in interface AgentInterface
Specified by:
getVersion in class Agent
Returns:
version


Copyright © 2013 Almende BV. All Rights Reserved.