org.exolab.jms.tools.admin
Class OpenJMSServer

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--org.exolab.jms.tools.admin.OpenJMSServer
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class OpenJMSServer
extends javax.swing.tree.DefaultMutableTreeNode

This class controls all dispay characteristics and menus related to an OpenJMSServer. Currently only add queue/topic is supported.

Version:
$Revision: 1.3 $ $Date: 2003/08/17 01:32:27 $
Author:
Jim Mourikis
See Also:
OpenJMSConsumer, AdminMgr, QueryDialog, Serialized Form

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
OpenJMSServer(java.lang.String serverName, javax.swing.JTree tree)
          The OpenJMS server connection.
 
Method Summary
protected  void createCommands()
          Create the menu for all servers and set up the Action events for each menu item.
static javax.swing.tree.DefaultTreeModel createServerList(javax.swing.JTree tree)
          Determine all known OpenJMSServers.
 void displayCommands(java.awt.Rectangle loc)
          This node has been right clicked.
 void displayConnections()
          Get all queue/topics from the database for this JMS server and display them as children of the root node.
 boolean getAllowsChildren()
          Children are allowed for all servers
 void refresh()
          This node has changed.
 java.lang.String toString()
          The unique name of this server
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenJMSServer

public OpenJMSServer(java.lang.String serverName,
                     javax.swing.JTree tree)
The OpenJMS server connection. Currently there is only one OpenJMSServer connection at a time.
Parameters:
serverName - The name of this server
tree - The parent tree this root node belongs to.
Method Detail

createCommands

protected void createCommands()
Create the menu for all servers and set up the Action events for each menu item. Since menus are shared, the callbacks called are static. Once a menu is slected, the slected node can be determined from the parent object.

createServerList

public static javax.swing.tree.DefaultTreeModel createServerList(javax.swing.JTree tree)
Determine all known OpenJMSServers. For the moment only the offline mode is supported, which is basically opening up the database directly.
Parameters:
tree - The parent tree this root node belongs to.

displayConnections

public void displayConnections()
Get all queue/topics from the database for this JMS server and display them as children of the root node.

getAllowsChildren

public boolean getAllowsChildren()
Children are allowed for all servers
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode
Returns:
boolean Always returns true.

displayCommands

public void displayCommands(java.awt.Rectangle loc)
This node has been right clicked. The locations of this node is given by the loc object. Use this location to popup the server message menu.
Parameters:
The - location of this Consumer node.

toString

public java.lang.String toString()
The unique name of this server
Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
String the server name.

refresh

public void refresh()
This node has changed. Inform the parent tree that it needs to be re-drawn.


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.