Websphere MQ Everyplace

examples.administration.console
Class Admin

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--examples.awt.AwtFrame
                                |
                                +--examples.administration.console.Admin
All Implemented Interfaces:
javax.accessibility.Accessible, AwtEvent, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class Admin
extends AwtFrame
implements java.beans.PropertyChangeListener

To provide a simple window interface for administering both local and remote queue managers.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 boolean active
           
static java.lang.String appTitle
          The title of the admin application Can be over-ridden by any subclass.
protected  java.lang.Object[][] frames
          One AdminFrame is created per resource type managed Frames array contains: 1st dim - an adminframe which holds fields required for chosen action 2nd dim - a panel which contains actions allowed for managed resource
protected  int selectedResource
          selectedResource = index of resource type that user wishes to manage ( index of last button selected in west panel)
static short[] version
          The version of the admin application.
 
Fields inherited from class examples.awt.AwtFrame
borderLayout1, BorderWhere, Center, East, format, Menu, North, panel, South, West
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Admin()
          Admin default constructor.
Admin(java.lang.String[] args)
          Admin constructor comment.
 
Method Summary
 void about()
          Display the "about" dialog.
 void action(java.lang.Object e, int where, int index, java.lang.String choice, boolean state)
          Process an MQe awt event.
 void actionBrowseAdminLog(java.lang.Object e, int where, int index, java.lang.String choice, boolean state)
          Process a request to browse the administration log.
 void actionSetup(java.lang.Object e, int where, int index, java.lang.String choice, boolean state)
          Process an administration setup request.
 void activate()
          Initialisation code.
 void addPropertyChangeListener()
          Sets up the admin frame as a property change listener.
 void checkConnected()
          Setup based on state of the connection to the local queue manager.
 void checkMode()
          Setup based on state of the connection to the queue manager.
 void close()
          Close window.
protected  void closeFrame()
          Handel window closing event.
 void disableStartStopQMButtons()
          Disables startqm/stopqm buttons in the setup panel.
 void displayActions(java.awt.Panel p, java.lang.String title)
          Set the east panel to panel p and makes visible.
 AdminModel getAdminModel()
          Return an admin model.
 java.lang.String[][][] getCenterNLSLabels()
          Create a list of the labels which appear at the center of the admin panel.
 java.lang.String[] getResourceClasses()
          Returns the set of AdminFrames for resources to be managed.
 java.lang.String[][][] getSouthNLSLabels()
          Gets a list of the label fields to use at the southern end of the Admin panel.
 MQeFields getStartupIni()
          Get queue manager startup parms from ini file.
static void main(java.lang.String[] args)
          Main method.
 void message(java.lang.String msg)
          Display a message.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Method to handle events for the PropertyChangeListener interface.
 AwtFormat setupSetupPanel()
          Set up some panels with the correct labels, putting references to the panels in global data members, for future reference.
 void setupWidgetReferences()
          Sets up the global references to the widgets we will want to obtain information from later on...
 void setWestButtonStatus(boolean state)
          Enables/disables the buttons on the west panel depending on the value specified.
 
Methods inherited from class examples.awt.AwtFrame
format, getActionIndex, getActionString, getCheckState, GetChoice, getObject, getPanel, getText, index, processWindowEvent, setPanel, setText, visible, visible
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

version

public static short[] version
The version of the admin application. Should be over-ridden by any subclass. Displayed in the "about" dialog box.


active

public boolean active

appTitle

public static java.lang.String appTitle
The title of the admin application Can be over-ridden by any subclass.


frames

protected java.lang.Object[][] frames
One AdminFrame is created per resource type managed Frames array contains: 1st dim - an adminframe which holds fields required for chosen action 2nd dim - a panel which contains actions allowed for managed resource


selectedResource

protected int selectedResource
selectedResource = index of resource type that user wishes to manage ( index of last button selected in west panel)

Constructor Detail

Admin

public Admin()
      throws java.lang.Exception
Admin default constructor.


Admin

public Admin(java.lang.String[] args)
      throws java.lang.Exception
Admin constructor comment.

Throws:
java.lang.Exception
Method Detail

about

public void about()
Display the "about" dialog.

Returns:
void

action

public void action(java.lang.Object e,
                   int where,
                   int index,
                   java.lang.String choice,
                   boolean state)

Process an MQe awt event.

Should be over-ridden by any subclass, but the super.Action() should be called so we get to process the base admin application events here.

Specified by:
action in interface AwtEvent
Overrides:
action in class AwtFrame
Parameters:
e - java.lang.Object
where - An integer indicating the location
index - An integer containing the type of resource to be managed
choice - java.lang.String
state - A Boolean
Returns:
void

actionBrowseAdminLog

public void actionBrowseAdminLog(java.lang.Object e,
                                 int where,
                                 int index,
                                 java.lang.String choice,
                                 boolean state)
                          throws java.lang.Exception
Process a request to browse the administration log.

Parameters:
e - java.lang.Object
where - An integer indicating the location
index - An integer containing the type of resource to be managed
choice - java.lang.String
state - A Boolean
Returns:
void
Throws:
java.lang.Exception

actionSetup

public void actionSetup(java.lang.Object e,
                        int where,
                        int index,
                        java.lang.String choice,
                        boolean state)
                 throws java.lang.Exception
Process an administration setup request.

Parameters:
e - java.lang.Object
where - An integer indicating the location
index - An integer containing the type of resource to be managed
choice - java.lang.String
state - A Boolean
Returns:
void
Throws:
java.lang.Exception

activate

public void activate()
              throws java.lang.Exception
Initialisation code.

Returns:
void
Throws:
java.lang.Exception

addPropertyChangeListener

public void addPropertyChangeListener()
Sets up the admin frame as a property change listener. This causes the events to be funnelled to our propertyChange() method.

Returns:
void

checkConnected

public void checkConnected()
Setup based on state of the connection to the local queue manager.

Returns:
void

checkMode

public void checkMode()
Setup based on state of the connection to the queue manager.

Returns:
void

close

public void close()
Close window.

Returns:
void

closeFrame

protected void closeFrame()
Handel window closing event.

Overrides:
closeFrame in class AwtFrame
Returns:
void

displayActions

public void displayActions(java.awt.Panel p,
                           java.lang.String title)
Set the east panel to panel p and makes visible.

Parameters:
p - Panel
title - java.lang.String
Returns:
void

getAdminModel

public AdminModel getAdminModel()
Return an admin model.

Returns:
AdminModel

getCenterNLSLabels

public java.lang.String[][][] getCenterNLSLabels()
Create a list of the labels which appear at the center of the admin panel.

Returns:
An array of java.lang.String array.

getResourceClasses

public java.lang.String[] getResourceClasses()
Returns the set of AdminFrames for resources to be managed.

Returns:
java.lang.String[]

getSouthNLSLabels

public java.lang.String[][][] getSouthNLSLabels()
Gets a list of the label fields to use at the southern end of the Admin panel.

Returns:
An array of String Array.

getStartupIni

public MQeFields getStartupIni()
                        throws java.lang.Exception
Get queue manager startup parms from ini file.

Returns:
MQeFields Object
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
Main method. standalone startup of Example administration gui.

Parameters:
args -
Returns:
void

message

public void message(java.lang.String msg)
Display a message.

Parameters:
msg - java.lang.String containing the message to be displayed.
Returns:
void

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Method to handle events for the PropertyChangeListener interface.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt - java.beans.PropertyChangeEvent
Returns:
void

setupSetupPanel

public AwtFormat setupSetupPanel()
Set up some panels with the correct labels, putting references to the panels in global data members, for future reference.

Returns:
AwtFormat The format object for the initial panel layout.

setupWidgetReferences

public void setupWidgetReferences()
Sets up the global references to the widgets we will want to obtain information from later on...

Returns:
void

setWestButtonStatus

public void setWestButtonStatus(boolean state)
Enables/disables the buttons on the west panel depending on the value specified.

Parameters:
state - boolean
Returns:
void

disableStartStopQMButtons

public void disableStartStopQMButtons()
Disables startqm/stopqm buttons in the setup panel. This is because these buttons are not appropriate for server qms (these buttons only start and stop *client* qms).

Returns:
void

Websphere MQ Everyplace