agentland.device
Interface MultiDevice

All Superinterfaces:
Agent, Device, Good, Managed, Remote, Spy
All Known Subinterfaces:
AbstractDeviceManager, DeviceManager, DrapesManager, LightManager, ProjectorManager
All Known Implementing Classes:
MultiDeviceAgent

public interface MultiDevice
extends Device

Generic interface for all agents that control a number of devices (further extended by DeviceManager which explicitly controls other agents) -- this one is meant mostly for agents that directly control several devices

See Also:
Device, DeviceManager

Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 boolean addManagedGrammar(String name)
          You can add a grammar that this agent will manage, i.e.
 AgentID getNameResolver()
          Returns the name resolver that this agent uses to store it's name-device associations
 boolean removeManagedGrammar(String name)
          Removes the grammar for the list of grammars to manage
 
Methods inherited from interface agentland.device.Device
addName, getName, getNames, getState, getState, getStateNames, hasName, resetAllStates, resetName, resetState, resetState, setName, setState
 
Methods inherited from interface agentland.resource.Managed
getNeed, replace, replace, resources, yank, yank
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

addManagedGrammar

public boolean addManagedGrammar(String name)
                          throws RemoteException
You can add a grammar that this agent will manage, i.e. it will update the rule to have all the names of all the devices this agent can control
Parameters:
name - name of the grammar (e.g. "agentland.device.lights.LightManager")
Returns:
true if things went well, false if something went wrong

removeManagedGrammar

public boolean removeManagedGrammar(String name)
                             throws RemoteException
Removes the grammar for the list of grammars to manage
Returns:
true if the grammar was there, false otherwise

getNameResolver

public AgentID getNameResolver()
                        throws RemoteException
Returns the name resolver that this agent uses to store it's name-device associations