agentland.device.display
Class ProjectorManagerAgent

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
                                                  |
                                                  +--agentland.device.AbstractDeviceManagerAgent
                                                        |
                                                        +--agentland.device.display.ProjectorManagerAgent
All Implemented Interfaces:
AbstractDeviceManager, Agent, Connectable, Device, DeviceManager, DisplayDevice, Good, Managed, MetagluePrimitives, MultiDevice, Projector, ProjectorManager, Remote, Serializable, Spy

public class ProjectorManagerAgent
extends AbstractDeviceManagerAgent
implements ProjectorManager

See Also:
Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Fields inherited from class agentland.device.AbstractDeviceManagerAgent
devices, managedDevices
 
Fields inherited from class agentland.device.MultiDeviceAgent
grammars, nameResolver, nameResolverID
 
Fields inherited from class agentland.device.DeviceAgent
defaultState, fName, names, states
 
Fields inherited from class agentland.resource.ManagedAgent
rm, society
 
Fields inherited from class agentland.util.GoodAgent
alert, notifier
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
ProjectorManagerAgent()
          Creates a new ProjectorManagerAgent instance.
 
Method Summary
 boolean connect(String in, String out)
           
protected  String[] getDefaultNames()
          Gets the default names for the ProjectorManagerAgent.
protected  String[] getWatchedOccupations()
          Gets an array of the agent occupations watched by this ProjectorManagerAgent.
 boolean inputRGB1()
          Switch all the projectors to RGB1 input.
 boolean inputRGB1(String name)
          Switch projector with the given name to Video input.
 boolean inputRGB2()
          Switch all the projectors to RGB2 input.
 boolean inputRGB2(String name)
          Switch projector with the given name to Video input.
 boolean inputVideo()
          Switch all the projectors to video input.
 boolean inputVideo(String name)
          Switch projector with the given name to Video input.
 boolean switchTo(String channel)
          Switch all the projectors to the given channel.
 boolean switchTo(String name, String channel)
          Switch the named projector to the given channel.
 boolean turnOff()
          Turn off the projectors.
 boolean turnOff(String name)
          Turn off the projector with the given name.
 boolean turnOn()
          Turn on the projectors.
 boolean turnOn(String name)
          Turn on the projector with the given name.
 
Methods inherited from class agentland.device.AbstractDeviceManagerAgent
addDevice, addSecretDevice, addSpies, callMethod, callMethod, callMethod, devices, devices, getAllAgentIDs, getAllNames, getDeviceIDs, getDevices, getPresent, registerKnown, removeDevice, setUpNaming
 
Methods inherited from class agentland.device.MultiDeviceAgent
addManagedGrammar, getNameResolver, removeManagedGrammar, setNameResolver, updateGrammar, updateGrammars
 
Methods inherited from class agentland.device.DeviceAgent
addName, createStateChangeNotification, ensureState, 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 class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agentland.device.AbstractDeviceManager
addSecretDevice, getDeviceIDs
 
Methods inherited from interface agentland.device.DeviceManager
addDevice, getDevices, removeDevice
 
Methods inherited from interface agentland.device.MultiDevice
addManagedGrammar, getNameResolver, removeManagedGrammar
 
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
 

Constructor Detail

ProjectorManagerAgent

public ProjectorManagerAgent()
                      throws RemoteException
Creates a new ProjectorManagerAgent instance.
Throws:
RemoteException - if an error occurs
Method Detail

connect

public boolean connect(String in,
                       String out)
                throws RemoteException
Specified by:
connect in interface Connectable
Following copied from interface: agentland.resource.connect.Connectable
Returns:
true or false if connect successful.

getWatchedOccupations

protected String[] getWatchedOccupations()
Gets an array of the agent occupations watched by this ProjectorManagerAgent.
Overrides:
getWatchedOccupations in class AbstractDeviceManagerAgent
Returns:
the agent occupations watched

getDefaultNames

protected String[] getDefaultNames()
Gets the default names for the ProjectorManagerAgent.
Overrides:
getDefaultNames in class DeviceAgent
Returns:
the names

turnOn

public boolean turnOn()
               throws RemoteException
Turn on the projectors.
Specified by:
turnOn in interface ProjectorManager
Returns:
true if successful
Throws:
RemoteException - if an error occurs

turnOn

public boolean turnOn(String name)
               throws RemoteException
Turn on the projector with the given name.
Specified by:
turnOn in interface ProjectorManager
Parameters:
name - the name of the projector
Returns:
true if successful
Throws:
RemoteException - if an error occurs

turnOff

public boolean turnOff()
                throws RemoteException
Turn off the projectors.
Specified by:
turnOff in interface ProjectorManager
Returns:
true if successful
Throws:
RemoteException - if an error occurs

turnOff

public boolean turnOff(String name)
                throws RemoteException
Turn off the projector with the given name.
Specified by:
turnOff in interface ProjectorManager
Parameters:
name - the name of the projector
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputVideo

public boolean inputVideo()
                   throws RemoteException
Switch all the projectors to video input.
Specified by:
inputVideo in interface ProjectorManager
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputVideo

public boolean inputVideo(String name)
                   throws RemoteException
Switch projector with the given name to Video input.
Specified by:
inputVideo in interface ProjectorManager
Parameters:
name - the name of the projector
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputRGB1

public boolean inputRGB1()
                  throws RemoteException
Switch all the projectors to RGB1 input.
Specified by:
inputRGB1 in interface ProjectorManager
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputRGB1

public boolean inputRGB1(String name)
                  throws RemoteException
Switch projector with the given name to Video input.
Specified by:
inputRGB1 in interface ProjectorManager
Parameters:
name - the name of the projector
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputRGB2

public boolean inputRGB2()
                  throws RemoteException
Switch all the projectors to RGB2 input.
Specified by:
inputRGB2 in interface ProjectorManager
Returns:
true if successful
Throws:
RemoteException - if an error occurs

inputRGB2

public boolean inputRGB2(String name)
                  throws RemoteException
Switch projector with the given name to Video input.
Specified by:
inputRGB2 in interface ProjectorManager
Parameters:
name - the name of the projector
Returns:
true if successful
Throws:
RemoteException - if an error occurs

switchTo

public boolean switchTo(String channel)
                 throws RemoteException
Switch all the projectors to the given channel.
Specified by:
switchTo in interface Projector
Parameters:
channel - the channel to switch to
Returns:
true if successful
Throws:
RemoteException - if an error occurs

switchTo

public boolean switchTo(String name,
                        String channel)
                 throws RemoteException
Switch the named projector to the given channel.
Specified by:
switchTo in interface ProjectorManager
Parameters:
name - the name of the projector
channel - the channel to switch to
Returns:
true if successful
Throws:
RemoteException - if an error occurs