agentland.device
Class MultiDeviceEHA

java.lang.Object
  |
  +--agentland.device.MultiDeviceEHA

public class MultiDeviceEHA
extends Object
implements ExceptionHandler, MultiDevice, Device


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
MultiDeviceEHA(MetagluePrimitives ap, AgentID agentID, Catalog c)
           
 
Method Summary
 boolean addManagedGrammar(String param0)
           
 void addMonitor(Spy param0)
          Add a log monitor that gets all the screen output.
 void addName(String param0)
          Allows you to add a new name by which this device can be known (or referred to)
 boolean alive()
           
 Agent getAgent()
          get the internal stub used.
 AgentID getAgentID()
           
 AgentID getAgtID()
          get the internal agentID used.
 Vector getHistory()
           
 String getHistoryElement(int param0)
           
 AgentID getMetaglueAgentID()
           
 String getName()
          Returns THE name for the device, i.e.
 Vector getNames()
          Returns all names for this device; if there are no names, you get back an empty vector.
 DeviceState getState()
           
 DeviceState getState(String param0)
           
 Vector getStateNames()
           
 boolean hasName(String param0)
          returns true if this device can be called by the name passed as a parameter (matching is done in case-insensitive way)
 void instantiate(Agent a)
           
 boolean removeManagedGrammar(String param0)
          Removes the grammar for the list of grammars to manage
 void replace(Resource param0, Resource param1)
           
 void replaceExceptionHandler(AgentExceptionHandler r)
           
 void resetAllStates()
           
 void resetHistory()
           
 String resetName(String param0)
          Cleares all names for this device and sets newName as the only name for it.
 void resetState()
           
 void resetState(String param0)
           
 Vector resources(Filter param0)
          Get all resources used that match the given filter.
 void setAgent(Agent a)
          set the internal stub used to passed agent.
 void setAgtID(AgentID a)
          set the internal agentID used to passed agent.
 String setName(int param0, String param1)
          Allows you to change the name on the list; starting index is 0;
 void setState(DeviceState param0)
           
 void shutdown()
           
 void startup()
           
 void tell(Secret param0)
          This is called if the Agent is to recieve a particular secret.
 InetAddress whereAreYou()
          Returns the InetAddress of the machine where the agent is running
 void yank(ResourceBunch param0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiDeviceEHA

public MultiDeviceEHA(MetagluePrimitives ap,
                      AgentID agentID,
                      Catalog c)
               throws RemoteException
Method Detail

getAgent

public Agent getAgent()
Description copied from interface: ExceptionHandler
get the internal stub used. (Used for resource management interception)
Specified by:
getAgent in interface ExceptionHandler

setAgent

public void setAgent(Agent a)
Description copied from interface: ExceptionHandler
set the internal stub used to passed agent. (Used for resource management interception)
Specified by:
setAgent in interface ExceptionHandler

getAgtID

public AgentID getAgtID()
Description copied from interface: ExceptionHandler
get the internal agentID used. (Used for resource management interception)
Specified by:
getAgtID in interface ExceptionHandler

setAgtID

public void setAgtID(AgentID a)
Description copied from interface: ExceptionHandler
set the internal agentID used to passed agent. (Used for resource management interception)
Specified by:
setAgtID in interface ExceptionHandler

instantiate

public void instantiate(Agent a)
Specified by:
instantiate in interface ExceptionHandler

replaceExceptionHandler

public void replaceExceptionHandler(AgentExceptionHandler r)
Specified by:
replaceExceptionHandler in interface ExceptionHandler

tell

public void tell(Secret param0)
          throws RemoteException
Description copied from interface: Spy
This is called if the Agent is to recieve a particular secret.

addMonitor

public void addMonitor(Spy param0)
                throws RemoteException
Description copied from interface: Agent
Add a log monitor that gets all the screen output.

alive

public boolean alive()
              throws RemoteException

getAgentID

public AgentID getAgentID()

getMetaglueAgentID

public AgentID getMetaglueAgentID()
                           throws RemoteException

shutdown

public void shutdown()
              throws RemoteException

startup

public void startup()
             throws RemoteException

whereAreYou

public InetAddress whereAreYou()
                        throws RemoteException
Description copied from interface: Agent
Returns the InetAddress of the machine where the agent is running

getHistory

public Vector getHistory()
                  throws RemoteException

getHistoryElement

public String getHistoryElement(int param0)
                         throws RemoteException

resetHistory

public void resetHistory()
                  throws RemoteException

replace

public void replace(Resource param0,
                    Resource param1)
             throws RemoteException

resources

public Vector resources(Filter param0)
                 throws RemoteException
Description copied from interface: Managed
Get all resources used that match the given filter. null filter means get all resources used.
Tags copied from interface: Managed
Returns:
Vector of AgentIDs

yank

public void yank(ResourceBunch param0)
          throws RemoteException

addName

public void addName(String param0)
             throws RemoteException
Description copied from interface: Device
Allows you to add a new name by which this device can be known (or referred to)
Specified by:
addName in interface Device

getName

public String getName()
               throws RemoteException
Description copied from interface: Device
Returns THE name for the device, i.e. the first name on the list of names for this device
Specified by:
getName in interface Device

getNames

public Vector getNames()
                throws RemoteException
Description copied from interface: Device
Returns all names for this device; if there are no names, you get back an empty vector.
Specified by:
getNames in interface Device

getState

public DeviceState getState()
                     throws RemoteException
Specified by:
getState in interface Device

getState

public DeviceState getState(String param0)
                     throws RemoteException
Specified by:
getState in interface Device

getStateNames

public Vector getStateNames()
                     throws RemoteException
Specified by:
getStateNames in interface Device

hasName

public boolean hasName(String param0)
                throws RemoteException
Description copied from interface: Device
returns true if this device can be called by the name passed as a parameter (matching is done in case-insensitive way)
Specified by:
hasName in interface Device

resetAllStates

public void resetAllStates()
                    throws RemoteException
Specified by:
resetAllStates in interface Device

resetName

public String resetName(String param0)
                 throws RemoteException
Description copied from interface: Device
Cleares all names for this device and sets newName as the only name for it.
Specified by:
resetName in interface Device
Tags copied from interface: Device
Returns:
the old main name

resetState

public void resetState()
                throws RemoteException
Specified by:
resetState in interface Device

resetState

public void resetState(String param0)
                throws RemoteException
Specified by:
resetState in interface Device

setName

public String setName(int param0,
                      String param1)
               throws RemoteException
Description copied from interface: Device
Allows you to change the name on the list; starting index is 0;
Specified by:
setName in interface Device
Tags copied from interface: Device
Parameters:
i - index of the name to change (corresponding to what you see when you do getNames()
newName - new name
Returns:
the old name or null if index was out of bounds

setState

public void setState(DeviceState param0)
              throws RemoteException
Specified by:
setState in interface Device

addManagedGrammar

public boolean addManagedGrammar(String param0)
                          throws RemoteException
Specified by:
addManagedGrammar in interface MultiDevice

removeManagedGrammar

public boolean removeManagedGrammar(String param0)
                             throws RemoteException
Description copied from interface: MultiDevice
Removes the grammar for the list of grammars to manage
Specified by:
removeManagedGrammar in interface MultiDevice
Tags copied from interface: MultiDevice
Returns:
true if the grammar was there, false otherwise