agentland.device
Class MultiDeviceAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.device.DeviceAgent
|
+--agentland.device.MultiDeviceAgent
- All Implemented Interfaces:
- Agent, Device, Good, Managed, MetagluePrimitives, MultiDevice, Remote, Serializable, Spy
- Direct Known Subclasses:
- AbstractDeviceManagerAgent
- public abstract class MultiDeviceAgent
- extends DeviceAgent
- implements MultiDevice
Base for all agents that directly control multiple devices at
once. This can refer to single agents that directly control
multiple devices or can be extended by device managers
- See Also:
DeviceAgent
,
MultiDevice
, Serialized Form
Methods inherited from class agentland.device.DeviceAgent |
addName, createStateChangeNotification, ensureState, getDefaultNames, getDefaultStateName, getName, getNames, getState, getState, getStateNames, hasName, quietException, resetAllStates, resetName, resetState, resetState, setDefaultStateName, setName, setState, throwException, updateState, updateState, updateState, updateState, updateState, updateState, updateState, updateState |
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou |
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.util.Spy |
tell |
grammars
protected Hashtable grammars
nameResolverID
protected AgentID nameResolverID
nameResolver
protected Translator nameResolver
MultiDeviceAgent
public MultiDeviceAgent()
throws RemoteException
setNameResolver
protected boolean setNameResolver(AgentID rid)
throws RemoteException
getNameResolver
public AgentID getNameResolver()
throws RemoteException
- Description copied from interface:
MultiDevice
- Returns the name resolver that this agent uses to store it's
name-device associations
- Specified by:
getNameResolver
in interface MultiDevice
setUpNaming
protected void setUpNaming()
throws RemoteException
- This method gets called after name resolver is set up. You
shuld override it in child classes to do things that depend on
the resolver being there.
addManagedGrammar
public boolean addManagedGrammar(String name)
throws RemoteException
- Allows you to add a grammar that this agent will manage for
you. If you ask this agent to manage a grammar, then every time
its list of names changes, it will update the grammar by
setting the list of alsternatives in rule "devices" to the list
of names it knows about. So you have to make sure you have the
rule "devices" in your grammar.
- Specified by:
addManagedGrammar
in interface MultiDevice
- Returns:
- true if the grammar was successfuly added, false
otherwise (e.g. if no such grammar exists)
removeManagedGrammar
public boolean removeManagedGrammar(String name)
throws RemoteException
- Removes the grammar for the list of grammars to manage
- Specified by:
removeManagedGrammar
in interface MultiDevice
- Returns:
- true if the grammar was there, false otherwise
updateGrammar
public void updateGrammar(AppGrammar g)
throws RemoteException
updateGrammars
public void updateGrammars()
throws RemoteException