亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? adminmgr.java

?? 一個java方面的消息訂閱發送的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/**
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided
 * that the following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright
 *    statements and notices.  Redistributions must also contain a
 *    copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the
 *    above copyright notice, this list of conditions and the
 *    following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. The name "Exolab" must not be used to endorse or promote
 *    products derived from this Software without prior written
 *    permission of Exoffice Technologies.  For written permission,
 *    please contact info@exolab.org.
 *
 * 4. Products derived from this Software may not be called "Exolab"
 *    nor may "Exolab" appear in their names without prior written
 *    permission of Exoffice Technologies. Exolab is a registered
 *    trademark of Exoffice Technologies.
 *
 * 5. Due credit should be given to the Exolab Project
 *    (http://www.exolab.org/).
 *
 * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
 * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright 2000-2003 (C) Exoffice Technologies Inc. All Rights Reserved.
 *
 * $Id: AdminMgr.java,v 1.1 2004/11/26 01:51:15 tanderson Exp $
 *
 * Date         Author  Changes
 */


package org.exolab.jms.tools.admin;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;

import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.JTree;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;

import org.apache.log4j.xml.DOMConfigurator;
import org.apache.oro.text.regex.*;

import org.exolab.jms.config.AdminConfiguration;
import org.exolab.jms.config.Configuration;
import org.exolab.jms.config.ConfigurationManager;
import org.exolab.jms.util.CommandLine;


/**
 * This class is the Gui controller for the JMS administration. It
 * displays data as a hierarchical set of tree nodes.
 *
 * <P>The Root is all the contactable JMS servers, idealy there can be several
 * of these all on different ports, with one common admin port they all listen
 * to. A user selects a JMSServer then connects via the menu item. This
 * allows the admin GUI to connect to the server via the main port and begin
 * displaying all its Queue/Topics and registered consumers.
 *
 * If there are no queue/topics for a consumer the node will be empty.
 * Selecting a consumer allows a user to see what its details are, i.e
 * last message received and acked, whether the consumer is currently
 * active/deactive paused etc.
 *
 * <P>The Gui can also be used to add/remove queue/topics and consumer
 * registrations.
 *
 * Reliable Topics are read only, since they cannot be persisted, they simply
 * display a snapshot at the time of connection.
 *
 * <P>For the moment this is not truly dynamic, that is a refresh needs to be
 * activated on the Gui to cause an update (other than changes made
 * through the Gui istelf).
 *
 * @version     $Revision: 1.1 $ $Date: 2004/11/26 01:51:15 $
 * @author      <a href="mailto:mourikis@exolab.org">Jim Mourikis</a>
 */
public class AdminMgr extends JFrame {

    // Gui Declarations
    private JMenuBar _menuBar;
    private JMenu _file;
    private JMenuItem _exit;
    private JMenu _actions;
    private JMenu _connections;
    private JMenuItem _refresh;
    private JMenuItem _online;
    private JMenuItem _offline;
    private JMenuItem _disconnect;
    private JSeparator _separator;
    private JMenuItem _startup;
    private JMenuItem _shutdown;
    private JScrollPane _jmsServers;
    private JTree _serverProperties;
    private JTextField _messageArea;
    private JComboBox _jmsCombo;

    // If this Admin object is connected to any OpenJMS
    private boolean _connected = false;

    /**
     * The server start command
     */
    private static String _serverStart = null;

    /**
     * The server configuration file path
     */
    private static String _serverConfig = null;

    // redirect stream to local console.
    private StreamRedirect _output = null;

    /**
     * The default constructor performs all gui creations.
     *
     */
    public AdminMgr() {
        this("");
    }

    public AdminMgr(String title) {
        initComponents(title);
        pack();
    }

    /** This method is called from within the constructor to
     * initialize the form. All the GUI objects are created, and callbacks
     * registered.
     */
    private void initComponents(String title) {
        _menuBar = new JMenuBar();
        _file = new JMenu();
        _exit = new JMenuItem();
        _actions = new JMenu();
        _connections = new JMenu();
        _refresh = new JMenuItem();
        _online = new JMenuItem();
        _offline = new JMenuItem();
        _disconnect = new JMenuItem();
        _separator = new JSeparator();
        _startup = new JMenuItem();
        _shutdown = new JMenuItem();
        _jmsServers = new JScrollPane();
        _jmsCombo = new JComboBox();
        _serverProperties = new JTree();
        setTitle("OpenJMS Administrator: " + title);
        DefaultTreeModel serverModel =
            OpenJMSServer.createServerList(_serverProperties);
        _serverProperties.setModel(serverModel);
        AdminInfo info = new AdminInfo();
        _serverProperties.setCellRenderer(info);

        _messageArea = new JTextField();
        _file.setText("File");
        _exit.setToolTipText("Exit administration");
        _exit.setText("Exit");
        _exit.setMnemonic('x');

        _serverProperties.setRootVisible(false);
        _serverProperties.setShowsRootHandles(true);
        _serverProperties.putClientProperty("JTree.lineStyle", "Angled");
        _serverProperties.setCellEditor(new OpenJMSEditor(_serverProperties,
            _jmsCombo));
        _serverProperties.setEditable(false);
        setupCallbacks();
        _file.add(_exit);
        _file.setMnemonic('F');
        _menuBar.add(_file);
        _actions.setText("Actions");
        _actions.setMnemonic('A');
        _connections.setText("Connections");
        _connections.setMnemonic('C');
        _refresh.setToolTipText("Refresh the display");
        _online.setToolTipText("Connect to a running OpenJMS Server");
        _offline.setToolTipText("Connect directly to an OpenJMS database");
        _refresh.setText("Refresh");
        _refresh.setMnemonic('R');
        _actions.add(_refresh);

        _online.setText("Online");
        _online.setMnemonic('O');
        _offline.setText("Offline");
        _offline.setMnemonic('f');
        _connections.add(_online);
        _connections.add(_offline);
        _actions.add(_connections);
        _disconnect.setToolTipText
            ("Disconnect from any connected OpenJMS Servers");
        _disconnect.setText("Disconnect");
        _disconnect.setMnemonic('D');
        _actions.add(_disconnect);

        _actions.add(_separator);
        _startup.setToolTipText("Start the OpenJMS server");
        _startup.setText("Start OpenJMS");
        _startup.setMnemonic('S');
        _shutdown.setToolTipText("Shutdown the connected OpenJMS server");
        _shutdown.setText("Shutdown OpenJMS");
        _shutdown.setMnemonic('h');
        _actions.add(_startup);
        _actions.add(_shutdown);
        _menuBar.add(_actions);

        _jmsServers.setViewportView(_serverProperties);


        getContentPane().add(_jmsServers, BorderLayout.CENTER);

        _messageArea.setToolTipText("Message Area");
        _messageArea.setEditable(false);
        _messageArea.setForeground(java.awt.Color.red);
        _messageArea.setText("Not Connected");
        _messageArea.setHorizontalAlignment(SwingConstants.CENTER);


        getContentPane().add(_messageArea, BorderLayout.SOUTH);
        setJMenuBar(_menuBar);
        _startup.setEnabled(true);
        _shutdown.setEnabled(false);
        _refresh.setEnabled(false);
        _disconnect.setEnabled(false);
    }

    /**
     * The exit method for the application, when the user shutdowns the form.
     *
     * @param evt The event that triggered this action.
     *
     */
    private void exitAdmin(ActionEvent evt) {
        System.exit(0);
    }

    /**
     * Exit the Application when a user selects File->Exit from the menu
     *
     * @param evt The window event that triggered this call.
     *
     */
    private void exitForm(WindowEvent evt) {
        System.exit(0);
    }

    /**
     * Refresh the display, and repaint all items.
     *
     * @param evt The event that triggered this operation.
     *
     */
    private void refresh(ActionEvent evt) {
        if (AbstractAdminConnection.instance() instanceof OnlineConnection) {
            setConnected(false, null);
            setConnected(true, "Connected - Online Mode");
            _startup.setEnabled(false);
            _shutdown.setEnabled(true);

        } else {
            ((OpenJMSServer) (_serverProperties.getModel().getRoot()
                )).refresh();
        }
    }

    /**
     * Start the OpenJMSServer.
     *
     */
    private void startup(ActionEvent evt) {

        try {
            String args[] = getStartCommand();

            System.out.print("running ");
            for (int i = 0, j = args.length; i < j; i++) {
                System.out.print(args[i] + " ");
            }
            System.out.println();

            if (_output != null) {
                // Stop the old redirect if any.
                _output.interrupt();
            }
            Process proc = Runtime.getRuntime().exec(args);
            // Redirect output
            _output = new StreamRedirect(proc.getInputStream());
            // kick it off
            _output.start();
        } catch (Exception err) {
            JOptionPane.showMessageDialog
                (this, "Failed to Startup OpenJMSServer:\n" + err
                + "\nCheck config file",
                    "OpenJMSServer Startup", JOptionPane.ERROR_MESSAGE);
        }
    }

    /**
     * When a user wishes to connect to all known OpenJMSServers.
     * Attempt to create an RMI connection to the OpenJMSServer. If the server
     * is not running, this will fail. The user can start the server through
     * the start server command, and attempt to re-connect, or use the offline
     * method below.
     *
     * @param evt The event that triggered this operation.
     *
     */
    private void onlineConnect(ActionEvent evt) {
        try {
            // if online.
            new OnlineConnection(this);
            _startup.setEnabled(false);
            _shutdown.setEnabled(true);
            setConnected(true, "Connected - Online Mode");
        } catch (Exception err) {
            JOptionPane.showMessageDialog
                (this, err.getMessage(), "Online Connection Error",
                    JOptionPane.ERROR_MESSAGE);
        }
    }


    /**
     * Connect to the database in offline mode. This action causes
     * the file chooser to be displayed, and the user must select an existing
     * database, or enter a new name to create a new database.
     *
     * All databases are suffixed with a ".db".
     *
     * @param evt The event that triggered this operation.
     *
     */
    private void offlineConnect(ActionEvent evt) {
        try {
            // if online.
            new OfflineConnection(this);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区在线观看| 亚洲免费观看高清在线观看| 91国模大尺度私拍在线视频| 国产精品一区二区果冻传媒| 久久电影网站中文字幕| 天使萌一区二区三区免费观看| 一区二区不卡在线播放 | 中文字幕一区二区三区四区| 欧美成人欧美edvon| 欧美久久一区二区| 在线观看91av| 欧美电影精品一区二区| 精品国产三级电影在线观看| 日韩女优av电影| 精品国产一区二区三区不卡| 久久综合av免费| 中文字幕 久热精品 视频在线| 国产精品欧美经典| 亚洲激情校园春色| 日韩黄色免费网站| 国内精品伊人久久久久av一坑| 黄一区二区三区| 粉嫩嫩av羞羞动漫久久久| 波多野结衣在线aⅴ中文字幕不卡| av在线不卡免费看| 欧美三级日韩三级国产三级| 欧美一区二区大片| 国产嫩草影院久久久久| 亚洲精品成a人| 另类中文字幕网| 白白色亚洲国产精品| 欧美日韩小视频| 精品久久五月天| 中文字幕亚洲在| 图片区小说区区亚洲影院| 国产麻豆精品视频| 99re6这里只有精品视频在线观看| 欧美日韩免费不卡视频一区二区三区| 欧美一区二区福利在线| 中文字幕一区二区三区在线不卡| 亚洲超碰97人人做人人爱| 久久99热国产| 日本韩国精品一区二区在线观看| 欧美一区二区精品在线| 国产精品福利一区二区| 日韩国产精品久久| av亚洲精华国产精华精| 欧美成人女星排名| 亚洲不卡在线观看| 97精品久久久午夜一区二区三区| 欧美精品久久99| 亚洲色图制服诱惑| 国产东北露脸精品视频| 一本色道亚洲精品aⅴ| 精品国产伦理网| 天堂一区二区在线| 日本韩国一区二区| 国产精品三级视频| 国产一区福利在线| 欧美日韩国产一区二区三区地区| 欧美激情一区在线观看| 激情文学综合网| 日韩午夜精品视频| 午夜精品福利久久久| 色狠狠一区二区三区香蕉| 日本一区二区三区四区在线视频| 久久精品国产久精国产| 欧美一级一级性生活免费录像| 亚洲免费伊人电影| av一区二区三区四区| 国产精品无码永久免费888| 国产一区二区中文字幕| 精品成人一区二区三区| 麻豆国产一区二区| 日韩欧美三级在线| 日韩**一区毛片| 欧美久久久影院| 奇米一区二区三区| 日韩一级高清毛片| 美女www一区二区| 欧美v日韩v国产v| 久久99热99| 国产清纯白嫩初高生在线观看91| 久久99精品久久只有精品| 日韩三区在线观看| 精品一区二区在线观看| 国产香蕉久久精品综合网| 高清不卡在线观看| 国产精品久久三| 在线亚洲欧美专区二区| 亚洲成人精品一区二区| 7777精品伊人久久久大香线蕉完整版 | 成人免费黄色大片| 中文字幕一区二区在线播放| 在线观看精品一区| 日韩中文字幕一区二区三区| 精品国产乱码久久久久久影片| 国产一区二区三区四区五区入口| 国产片一区二区三区| 99re亚洲国产精品| 日本女人一区二区三区| 久久久一区二区| 91麻豆成人久久精品二区三区| 亚洲免费大片在线观看| 欧美高清视频www夜色资源网| 热久久国产精品| 中文一区在线播放| 欧美日韩免费一区二区三区| 久久99精品国产| 国产精品进线69影院| 欧美日本精品一区二区三区| 国产一区 二区| 亚洲国产日韩a在线播放性色| 日韩美女一区二区三区| 成人精品视频.| 日韩精品一卡二卡三卡四卡无卡| 久久久久久电影| 欧美无砖砖区免费| 成人黄色小视频在线观看| 午夜激情一区二区| 中文字幕中文字幕中文字幕亚洲无线| 欧美视频日韩视频在线观看| 国产精品资源在线观看| 图片区小说区国产精品视频| 国产精品乱码人人做人人爱 | 精品国产乱子伦一区| 在线观看日韩一区| 国产iv一区二区三区| 性欧美大战久久久久久久久| 欧美激情一区二区| 精品日韩av一区二区| 欧美成人bangbros| 在线视频综合导航| www.欧美精品一二区| 激情小说亚洲一区| 麻豆精品一区二区| 婷婷综合久久一区二区三区| 亚洲色图欧美在线| 亚洲国产精品传媒在线观看| 欧美不卡一区二区三区四区| 欧美日韩免费不卡视频一区二区三区 | 亚洲最新视频在线播放| 国产精品丝袜久久久久久app| 欧美成人一区二区三区在线观看| 欧美午夜电影一区| 在线免费av一区| 91搞黄在线观看| 91蜜桃免费观看视频| www.欧美色图| 色狠狠色噜噜噜综合网| 91免费国产在线| 日本韩国精品在线| 在线观看精品一区| 欧美在线观看视频一区二区| 色欲综合视频天天天| 91看片淫黄大片一级| 91欧美一区二区| 色婷婷久久久久swag精品 | 亚洲丰满少妇videoshd| 一区二区三区日韩| 亚洲欧美经典视频| 亚洲综合一区二区| 午夜欧美视频在线观看| 日韩制服丝袜先锋影音| 伦理电影国产精品| 国产一区二区免费在线| 大白屁股一区二区视频| 99re成人在线| 欧美日韩激情在线| 日韩精品一区二区三区在线观看| 亚洲精品在线三区| 国产精品美女久久久久av爽李琼| 亚洲色大成网站www久久九九| 亚洲一二三区视频在线观看| 全国精品久久少妇| 国产91在线看| 日韩一级高清毛片| 久久久蜜桃精品| 亚洲欧美国产三级| 视频一区欧美精品| 国产精品一级片在线观看| 99re这里只有精品首页| 7777精品伊人久久久大香线蕉| 精品国产一区二区三区不卡 | 国产蜜臀av在线一区二区三区| 亚洲欧美日韩系列| 美女视频黄a大片欧美| 丁香网亚洲国际| 欧美麻豆精品久久久久久| 久久天天做天天爱综合色| 综合色天天鬼久久鬼色| 日本不卡一区二区三区| 成人手机在线视频| 欧美一区二区三区在线| 国产三级欧美三级日产三级99 | 久久久亚洲高清| 亚洲一区二区三区激情| 国产精品一区二区在线看| 欧美视频在线播放| 中文av一区二区|