net.hivecell.hive.agent.desktop
Class ImageTakingDisplayingAgentImpl
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--net.hivecell.hive.agent.AgentImpl
|
+--net.hivecell.hive.agent.desktop.ImageTakingDisplayingAgentImpl
- public class ImageTakingDisplayingAgentImpl
- extends AgentImpl
- See Also:
- Serialized Form
Fields inherited from class net.hivecell.hive.agent.AgentImpl |
AGENTKILLED,
AGENTMOVED,
agentThreadGroup,
commandList,
commands,
description,
icon,
iconName,
myAddress,
myCell,
readyFlag,
stopCode,
timeToStop |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
void |
doBehavior()
Do the basic behavior for an agent, the agent's main loop. |
void |
doLocalCleanup()
Command the agent to free its local resources here. |
void |
doLocalSetup()
Handle the setup when an agent arrives on a host -- it is
appropriate to allocate system resources (file descriptors,
etc) here and even to locate other agents that this agent needs
to communicate with. |
void |
setImageSourceAgent(ImageSourceAgent isa)
|
Methods inherited from class net.hivecell.hive.agent.AgentImpl |
addActionCommand,
blockUntilReady,
configure,
connectTo,
diePlease,
disconnectFrom,
disconnectFromAll,
getActionCommands,
getAddress,
getCell,
getComponentManagerShadow,
getDescription,
getIcon,
getIconName,
getName,
getThreadGroup,
invokeActionCommand,
isReady,
isTimeToStop,
listAllIncomingConnections,
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 |
cms
protected transient ComponentManagerShadow cms
idc
protected transient ImageDisplayCanvas idc
frame
protected transient javax.swing.JFrame frame
isaCellAddress
protected CellAddress isaCellAddress
isa
protected transient ImageSourceAgent isa
ImageTakingDisplayingAgentImpl
public ImageTakingDisplayingAgentImpl()
throws java.rmi.RemoteException
setImageSourceAgent
public void setImageSourceAgent(ImageSourceAgent isa)
doLocalSetup
public void doLocalSetup()
throws AgentInitializationException
- Description copied from class: AgentImpl
- Handle the setup when an agent arrives on a host -- it is
appropriate to allocate system resources (file descriptors,
etc) here and even to locate other agents that this agent needs
to communicate with.
- Overrides:
- doLocalSetup in class AgentImpl
- Tags copied from class: AgentImpl
- Throws:
- AgentInitializationException - can be thrown by the agent if for some reason it cannot fufil its setup stuff
doBehavior
public void doBehavior()
- Description copied from class: 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 AgentImpl
- Tags copied from class: AgentImpl
- See Also:
timeToStop
,
doLocalSetup
doLocalCleanup
public void doLocalCleanup()
- Description copied from class: AgentImpl
- Command the agent to free its local resources here. It may or
may not equal what happens when the agent is supposed to die --
but here would be the appropriate place to free File
descriptors, and stop threads, but do not do anything related
to the agent community -- do not notify them that this agent is
about to die. When this method terminates, this agent should
be ready to be killed
- Overrides:
- doLocalCleanup in class AgentImpl