org.iids.aos.systemservices
Interface AgentServer

All Superinterfaces:
SystemService
All Known Implementing Classes:
LocalAgentServer

public interface AgentServer
extends SystemService

Author:
hidde@cs.vu.nl, rjtimmer@cs.vu.nl

Field Summary
static java.lang.String FINISHED_AGENT
           
static java.lang.String LOOKUP_REGISTRATION_NAME
           
 
Method Summary
 java.lang.String do_http_request(java.lang.String request)
           
 java.util.Vector<AgentID> get_agents()
           
 int getAgentCPUtime(AgentID agentID)
           
 void remove_agent(AgentID agentId)
          Remove agent from the agent server.
 void start_agent(AgentID agentId, java.lang.String[] args)
          Start running an agent on this agent server.
 void suspend_agent(AgentID agentId)
          Suspend the running agent and, if possible, store its state in the container belonging to the agent.
 
Methods inherited from interface org.iids.aos.systemservices.SystemService
pingService, shutdown, unbind
 

Field Detail

LOOKUP_REGISTRATION_NAME

static final java.lang.String LOOKUP_REGISTRATION_NAME
See Also:
Constant Field Values

FINISHED_AGENT

static final java.lang.String FINISHED_AGENT
See Also:
Constant Field Values
Method Detail

start_agent

void start_agent(AgentID agentId,
                 java.lang.String[] args)
                 throws AgentIDUnknownException,
                        AgentStartupException
Start running an agent on this agent server. Agent code is read from the agent container (through the API).

Parameters:
agentId - The AgentID of the agent to register.
Throws:
AgentIDUnknownException - If the agent is not known by the host manager.
AgentStartupException - If the agent implementation cannot be loaded or started.

suspend_agent

void suspend_agent(AgentID agentId)
                   throws AgentIDUnknownException,
                          AgentSuspendException
Suspend the running agent and, if possible, store its state in the container belonging to the agent.

If the AgentRunner that implements this function supports this, the agent state is automatically written to the agent container, though this depends on the implementation of the agent server.

Parameters:
agentId - The AgentID of the agent to suspend.
Throws:
AgentIDUnknownException - The AgentID is not known on this agent server.
AgentSuspendException - Problem suspending the agent.

remove_agent

void remove_agent(AgentID agentId)
                  throws AgentIDUnknownException
Remove agent from the agent server. If possible, the agent process is also killed, though it depends on the agent server implementation whether this actually is possible.

Parameters:
agentId - The AgentID of the agent to remove.
Throws:
AgentIDUnknownException - The AgentID is not known on this agent server.

get_agents

java.util.Vector<AgentID> get_agents()

getAgentCPUtime

int getAgentCPUtime(AgentID agentID)
                    throws AgentIDUnknownException
Throws:
AgentIDUnknownException

do_http_request

java.lang.String do_http_request(java.lang.String request)


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.