examples.jumpagent
Class JumpAgent

java.lang.Object
  extended byde.fhg.igd.semoa.hsmagent.AbstractAgent
      extended byde.fhg.igd.semoa.hsmagent.HSMAgent
          extended byexamples.jumpagent.JumpAgent
All Implemented Interfaces:
Agent, Context, Resumable, Runnable, Serializable

public class JumpAgent
extends HSMAgent

This is and extended version of the JumpingAgent. The agent was designed to graphically demonstrate the migration process. It creates a frame that contains a combo box and a button. The combo box offers the user all servers that are known to the agent. If the button is pressed, the migration takes place and the agent "jumps" to the selected server.

This implementation uses a state machine.

Version:
"$Id: JumpAgent.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Haevecker
See Also:
Serialized Form

Field Summary
private  JumpAgentGUI commandFrame_
          Holds the GUI.
 
Fields inherited from class de.fhg.igd.semoa.hsmagent.HSMAgent
 
Constructor Summary
JumpAgent()
          Default constructor.
 
Method Summary
 ArrayList findTargets()
          Initializes the URL array from the Vicinity service.
 JumpAgentGUI getCommandFrame()
           
 String getCurrentHost()
           
 String getLastHost()
           
 void setCommandFrame(JumpAgentGUI commandFrame)
           
 
Methods inherited from class de.fhg.igd.semoa.hsmagent.HSMAgent
get, getEventBus, getEventDispatcher, getTriggerEvent, init, run, set, setEventDispatcher, setHSM, setTriggerEvent
 
Methods inherited from class de.fhg.igd.semoa.hsmagent.AbstractAgent
resume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandFrame_

private transient JumpAgentGUI commandFrame_
Holds the GUI. The member is transient because GUIs can't be migrated. They aren't seralizable due to their native references to the window manager. Hence the agent will re-create its GUI on every host after migration.

Constructor Detail

JumpAgent

public JumpAgent()
Default constructor.

Method Detail

getCommandFrame

public JumpAgentGUI getCommandFrame()

setCommandFrame

public void setCommandFrame(JumpAgentGUI commandFrame)

findTargets

public ArrayList findTargets()
Initializes the URL array from the Vicinity service.

Returns:
The ArrayList of found targets or null, if Vicinity is not installed.

getLastHost

public String getLastHost()

getCurrentHost

public String getCurrentHost()


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.