Class OpenJMSServer

All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode,, 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.

$Revision: 1.3 $ $Date: 2003/08/17 01:32:27 $
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


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


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.


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.
tree - The parent tree this root node belongs to.


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


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


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.
The - location of this Consumer node.


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


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.