Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.mit.media.hive.agent.hiveui
Class BaseGUIAgentImpl  view BaseGUIAgentImpl download BaseGUIAgentImpl.java

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byedu.mit.media.hive.agent.AgentImpl
                  extended byedu.mit.media.hive.agent.EventReceivingAgentImpl
                      extended byedu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
                          extended byedu.mit.media.hive.agent.hiveui.BaseGUIAgentImpl
All Implemented Interfaces:
edu.mit.media.hive.agent.Agent, edu.mit.media.hive.rdf.Describable, java.util.EventListener, edu.mit.media.hive.agent.EventReceivingAgent, java.rmi.Remote, edu.mit.media.hive.event.RemoteEventListener, java.io.Serializable
Direct Known Subclasses:
BaseAWTGUIAgentImpl, BaseSwingGUIAgentImpl

public abstract class BaseGUIAgentImpl
extends BaseUIAgentImpl

this class is the next level up on top of the base ui agent -- the purpose of this is so we have a standard way to get the popup boxes that we like


Field Summary
protected  edu.mit.media.hive.shadow.cell.ComponentManagerShadow acms
          a handle to the ACMS so we don't need to look it up every time.
 
Fields inherited from class edu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
ag, agentAddresses, ama, cellControlAgents, changeMonitoringCellCmd, changeShowCellAgentsCmd, connectCmd, defaultCellCmds, defaultCmds, disconnectAllCmd, disconnectCmd, killCellCmd, killCmd, menu, monitoredCells, moveCmd, propertiesCmd, variablePropertyManipulators
 
Fields inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
agentSubscriptions
 
Fields inherited from class edu.mit.media.hive.agent.AgentImpl
AGENTKILLED, AGENTMOVED, agentThreadGroup, commandList, commands, description, icon, iconName, myCell, readyFlag, stopCode, timeToStop
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
BaseGUIAgentImpl()
           
 
Method Summary
protected  void constructMenus()
          a helper function that reads the RDF files and stuff and creates the default menus that we are going to use
 void doBehavior()
          Do the basic behavior for an agent, the agent's main loop.
 void doLocalSetup()
          do our local setup which just involves letting the BaseUIAgent do its stuff, and then we can lookup our agent component manager shadow
 boolean invokeMenuCommand(edu.mit.media.hive.agent.Agent a, java.lang.String command)
          deal with action commands (probably from the agent icon's popup menu) -- this method overrides the one i the BaseUIAgent so we can popup dialog boxes
private  void replaceInvokeCommands(edu.mit.media.hive.support.menu.MenuFolder folder)
          helper function to go through menu folders and replace all the menu items with new menu items with different invoke statements
abstract  void showConfigureAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
          method to bring up a variable sheet editor
abstract  void showCreateAgentByNameDialogBox()
          method to bring up a dialog box to create an agent by its java class name
abstract  void showCreateAgentDialogBox(java.lang.String agent)
          method to bring up the dialog box with the agent icon and stuff like that
abstract  void showMoveAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
          method to bring up the dialog box with the agent icon for movement
abstract  void showShutdownCellDialogBox()
          method to bring up a dialog box containing which servers we want to shut down
abstract  void showStartMonitorCellDialogBox()
          method to bring up a dialog box to start monitoring another cell
abstract  void showStopMonitorCellDialogBox()
          method to bring up a dialog box containing which server we want to stop monitoring
 
Methods inherited from class edu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
connectAgentsCommand, createNewAgentCommand, disconnectAgentAllCommand, disconnectAgentsCommand, doLocalCleanup, getAccessibleVariable, getAccessibleVariableNames, getAccessibleVariableType, getAgentAddress, getAgentIcon, getAgentName, getCellAddress, getMenuNames, getMonitoredCells, invokeCellMenuCommand, killAgentCommand, monitorCell, moveAgentCommand, notify, renderAgentMessage, renderCellReport, renderConnectAgents, renderDisconnectAgents, renderDisconnectFromAll, renderNewAgent, renderRemoveAgent, setAccessibleVariable, shutdownCellCommand, stopMonitoringCell
 
Methods inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
connectTo, diePlease, disconnectFrom, disconnectFromAll, listAllIncomingConnections, notify, subscribeTo
 
Methods inherited from class edu.mit.media.hive.agent.AgentImpl
addActionCommand, blockUntilReady, configure, doBehaviour, getActionCommands, getCell, getComponentManagerShadow, getDescription, getIcon, getIconName, getName, getThreadGroup, invokeActionCommand, isReady, isTimeToStop, listAllOutgoingConnections, loadIcon, moveTo, onDying, onMoving, setCell, setDescription, setIconName, setIsReady, setThreadGroup, setTimeToStop, waitUntilDeath
 
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 edu.mit.media.hive.agent.Agent
blockUntilReady, configure, getActionCommands, getCell, getDescription, getIcon, getName, invokeActionCommand, isReady, listAllOutgoingConnections
 
Methods inherited from interface edu.mit.media.hive.rdf.Describable
setDescription
 

Field Detail

acms

protected edu.mit.media.hive.shadow.cell.ComponentManagerShadow acms
a handle to the ACMS so we don't need to look it up every time.

Constructor Detail

BaseGUIAgentImpl

public BaseGUIAgentImpl()
                 throws java.rmi.RemoteException
Method Detail

doLocalSetup

public void doLocalSetup()
do our local setup which just involves letting the BaseUIAgent do its stuff, and then we can lookup our agent component manager shadow

Overrides:
doLocalSetup in class BaseUIAgentImpl

doBehavior

public void doBehavior()
Description copied from class: edu.mit.media.hive.agent.AgentImpl
Do the basic behavior for an agent, the agent's main loop. Override this to provide your particular agent's behavior. Note: the doBehavior loop should not exit. Please call waitUntilDeath() at the end of this method, this will prevent the Cell from believing this agent prematurely exited.

Overrides:
doBehavior in class BaseUIAgentImpl

constructMenus

protected void constructMenus()
a helper function that reads the RDF files and stuff and creates the default menus that we are going to use

Overrides:
constructMenus in class BaseUIAgentImpl

replaceInvokeCommands

private void replaceInvokeCommands(edu.mit.media.hive.support.menu.MenuFolder folder)
helper function to go through menu folders and replace all the menu items with new menu items with different invoke statements


showShutdownCellDialogBox

public abstract void showShutdownCellDialogBox()
method to bring up a dialog box containing which servers we want to shut down


showStartMonitorCellDialogBox

public abstract void showStartMonitorCellDialogBox()
method to bring up a dialog box to start monitoring another cell


showStopMonitorCellDialogBox

public abstract void showStopMonitorCellDialogBox()
method to bring up a dialog box containing which server we want to stop monitoring


showCreateAgentByNameDialogBox

public abstract void showCreateAgentByNameDialogBox()
method to bring up a dialog box to create an agent by its java class name


showCreateAgentDialogBox

public abstract void showCreateAgentDialogBox(java.lang.String agent)
method to bring up the dialog box with the agent icon and stuff like that


showMoveAgentDialogBox

public abstract void showMoveAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
method to bring up the dialog box with the agent icon for movement


showConfigureAgentDialogBox

public abstract void showConfigureAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
method to bring up a variable sheet editor


invokeMenuCommand

public boolean invokeMenuCommand(edu.mit.media.hive.agent.Agent a,
                                 java.lang.String command)
deal with action commands (probably from the agent icon's popup menu) -- this method overrides the one i the BaseUIAgent so we can popup dialog boxes

Overrides:
invokeMenuCommand in class BaseUIAgentImpl