de.fhg.igd.earth.observe.trace
Class AtlasConnector

java.lang.Object
  extended byde.fhg.igd.earth.observe.trace.AtlasConnector
All Implemented Interfaces:
ActionListener, EventListener, Listener, MouseListener, Runnable, WindowListener

public class AtlasConnector
extends Object
implements Runnable, Listener, ActionListener, WindowListener, MouseListener

Provides a GUI for the AgentTracer which traces the contact addresses of agents in a certain watch list. This Agent Tracer Gui (AtlasConnector) is used to display the tracked agents together with their current contact address. It's possible to delete entries from the watch list and to set the update time of the agent tracer daemon.

Version:
"$Id: AtlasConnector.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
AgentTracer

Field Summary
protected  boolean addAgentsAutomatically_
           
protected  JButton addButton_
           
protected  JMenuItem addItem_
           
protected  int agentNr_
           
protected  Set agentsToAdd_
           
protected  AgentTracer agentTracer_
           
static AtlasStimulator atlasStimulator_
           
 JFrame commandFrame_
           
 SortedMap contactAddresses_
           
protected  JMenuItem deleteItem_
           
 byte[][] entries_
           
private  Object guiEventLock_
           
protected  String namePrefix_
           
private  Object notifyLock_
           
protected  JPopupMenu popupMenuContext_
           
protected  JPopupMenu popupMenuGlobal_
           
protected  JMenuItem refreshItem_
           
private  boolean running_
           
protected  JScrollPane scrollPane_
           
protected  JMenuItem setUpdateTimeItem_
           
protected  JMenuItem setUpdateTimeItem2_
           
 JTable table_
           
private  Object updateLock_
           
private  Object waitLock_
           
protected  String windowName_
           
 
Constructor Summary
AtlasConnector()
          Default constructor to create an instance of this class.
 
Method Summary
 void actionPerformed(ActionEvent a)
          Catches action events from setUpdateTimeItem_, setUpdateTimeItem2_, refreshItem_ and deleteItem_.
 void addAgentsAutomatically(boolean flag)
           
private  void initGUI()
          Initialize the GUI with a table to display the database entries.
static void main(String[] argv)
          Starts the GUI from command line.
 void mouseClicked(MouseEvent e)
          Catches mouse events within table_ and scrollPain_ used to open an close a context menu.
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void notifiedOf(Object obj)
          This method is called from the proxy's or server's event reflector and informs the class of changes of their database's state.
 void run()
          Searches the AgentTracer locally and opens a GUI.
 void setStimulus(AtlasStimulator as)
          Set the ".stimulus()" method class
private  void updateGUI()
          Updates the GUI by requesting the current agent tracer data.
 void windowActivated(WindowEvent e)
           
 void windowClosed(WindowEvent e)
          Called after main window has been closed.
 void windowClosing(WindowEvent e)
          Disposes the main window.
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandFrame_

public transient JFrame commandFrame_

scrollPane_

protected transient JScrollPane scrollPane_

table_

public transient JTable table_

addButton_

protected transient JButton addButton_

popupMenuGlobal_

protected transient JPopupMenu popupMenuGlobal_

setUpdateTimeItem2_

protected transient JMenuItem setUpdateTimeItem2_

popupMenuContext_

protected transient JPopupMenu popupMenuContext_

setUpdateTimeItem_

protected transient JMenuItem setUpdateTimeItem_

refreshItem_

protected transient JMenuItem refreshItem_

deleteItem_

protected transient JMenuItem deleteItem_

addItem_

protected transient JMenuItem addItem_

agentTracer_

protected transient AgentTracer agentTracer_

entries_

public transient byte[][] entries_

contactAddresses_

public transient SortedMap contactAddresses_

namePrefix_

protected transient String namePrefix_

windowName_

protected transient String windowName_

guiEventLock_

private transient Object guiEventLock_

updateLock_

private transient Object updateLock_

notifyLock_

private transient Object notifyLock_

waitLock_

private transient Object waitLock_

running_

private transient boolean running_

atlasStimulator_

public static AtlasStimulator atlasStimulator_

addAgentsAutomatically_

protected transient boolean addAgentsAutomatically_

agentsToAdd_

protected transient Set agentsToAdd_

agentNr_

protected transient int agentNr_
Constructor Detail

AtlasConnector

public AtlasConnector()
Default constructor to create an instance of this class.

Method Detail

run

public void run()
Searches the AgentTracer locally and opens a GUI.

Specified by:
run in interface Runnable

initGUI

private void initGUI()
Initialize the GUI with a table to display the database entries.


updateGUI

private void updateGUI()
Updates the GUI by requesting the current agent tracer data.


setStimulus

public void setStimulus(AtlasStimulator as)
Set the ".stimulus()" method class


actionPerformed

public void actionPerformed(ActionEvent a)
Catches action events from setUpdateTimeItem_, setUpdateTimeItem2_, refreshItem_ and deleteItem_. Used to handle the buttons and context menu items.

Specified by:
actionPerformed in interface ActionListener
Parameters:
a - The action event.

mouseClicked

public void mouseClicked(MouseEvent e)
Catches mouse events within table_ and scrollPain_ used to open an close a context menu.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - The mouse event.

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

windowClosed

public void windowClosed(WindowEvent e)
Called after main window has been closed. Notifies the GUI of this event, that the GUI can terminate (without storing the update time).

Specified by:
windowClosed in interface WindowListener
Parameters:
e - The window event.

windowClosing

public void windowClosing(WindowEvent e)
Disposes the main window.

Specified by:
windowClosing in interface WindowListener
Parameters:
e - The window event.

windowActivated

public void windowActivated(WindowEvent e)
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener

addAgentsAutomatically

public void addAgentsAutomatically(boolean flag)

notifiedOf

public void notifiedOf(Object obj)
This method is called from the proxy's or server's event reflector and informs the class of changes of their database's state.

Specified by:
notifiedOf in interface Listener
Parameters:
obj - The object describing the action.

main

public static void main(String[] argv)
Starts the GUI from command line.

Parameters:
argv - The command line parameters.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.