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

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

?? adminmgr.java

?? 一個java方面的消息訂閱發送的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
            _startup.setEnabled(false);
            _shutdown.setEnabled(false);
            setConnected(true, "Connected - OFFLine Mode");
        } catch (Exception err) {
            JOptionPane.showMessageDialog
                (this, err.getMessage(), "Database Error",
                    JOptionPane.ERROR_MESSAGE);
        }
    }

    /**
     * Disconnect from a connected OpenJMSServer. Close the database, set the
     * connected flag to false, stop displaying the OpenJMS folder.
     *
     * @param evt The event that triggered this operation.
     *
     */
    private void disconnect(ActionEvent evt) {
        try {
            AbstractAdminConnection.instance().close();
            setConnected(false, null);
        } catch (Exception e) {
            JOptionPane.showMessageDialog
                (this, e.getMessage(), "Database Close Error",
                    JOptionPane.ERROR_MESSAGE);
        }
    }

    /**
     * A conveniance routine to open/close all database connections,
     * and fix up the display.
     *
     * <P>When connecting, show the root object, get any persistent queue/topic
     * names currently in the db, and display them.
     * Turn off the connection menu, enable the disconnection and shutdown
     * and the context menus. Set the message area text to connected.
     *
     * <P>When disconnecting, turn off the root, destroy all Gui objects
     * close the db connection, turn off all context sensitive menus,
     * disable disconnection menu and enable connection. Set the message
     * text to disconnected.
     *
     * @param c a flag inidication if this is a connection or disconnection.
     *
     */
    private void setConnected(boolean c, String st) {
        if (c) {
            _serverProperties.setRootVisible(true);
            ((OpenJMSServer)
                (_serverProperties.getModel().getRoot())).displayConnections();
            _connections.setEnabled(false);
            _refresh.setEnabled(true);
            // _shutdown.setEnabled(true);
            _disconnect.setEnabled(true);
            // _startup.setEnabled(false);
            _messageArea.setForeground(java.awt.Color.green.darker().darker());
            _messageArea.setText(st);
            _connected = true;
        } else {
            _serverProperties.setRootVisible(false);
            OpenJMSServer root =
                (OpenJMSServer) _serverProperties.getModel().getRoot();
            root.removeAllChildren();
            DefaultTreeModel model =
                (DefaultTreeModel) _serverProperties.getModel();
            model.nodeStructureChanged((DefaultMutableTreeNode) root);
            _connections.setEnabled(true);
            _startup.setEnabled(true);
            _shutdown.setEnabled(false);
            _refresh.setEnabled(false);
            _disconnect.setEnabled(false);
            _messageArea.setForeground(java.awt.Color.red);
            _messageArea.setText("Not Connected");
            _connected = false;
        }
    }

    /**
     * Set up all Action menu callbacks, and mouse events for the tree and its
     * nodes. Check all mose 2 key presses on a node, select the node,
     * then call the nodes appropriate display methos to display its
     * specific popup menus.
     *
     * <P>When first connected, all queue/topics displayed are not expaned.
     * This is just a performance saver, since their could potentially
     * be hundreds of objects. A callback is set up, so that when a queue/topic
     * is expanded, it is lokked up only then to determine what consumers
     * are registered with it.
     */
    private void setupCallbacks() {

        addWindowListener(new WindowAdapter() {

            public void windowClosing(WindowEvent evt) {
                exitForm(evt);
            }
        }
        );


        _serverProperties.addMouseListener(new MouseAdapter() {

            public void mousePressed(MouseEvent e) {
                if (!_connected) {
                    return;
                }

                if (SwingUtilities.isRightMouseButton(e)) {
                    int selRow = _serverProperties.getRowForLocation
                        (e.getX(), e.getY());

                    _serverProperties.setSelectionRow(selRow);
                    Object loc =
                        _serverProperties.getLastSelectedPathComponent();
                    if (loc instanceof OpenJMSNode) {
                        OpenJMSNode node = (OpenJMSNode) loc;
                        node.displayCommands
                            (_serverProperties.getRowBounds(selRow));
                    } else if (loc instanceof OpenJMSServer) {
                        ((OpenJMSServer) loc).displayCommands
                            (_serverProperties.getRowBounds(selRow));
                    }
                }
            }
        }
        );

        _serverProperties.addTreeExpansionListener(new TreeExpansionListener() {

            public void treeCollapsed(TreeExpansionEvent e) {
                // todo Anything.....
            }

            public void treeExpanded(TreeExpansionEvent e) {
                TreePath path = e.getPath();
                Object loc = path.getLastPathComponent();
                if (loc instanceof OpenJMSNode) {
                    OpenJMSNode node = (OpenJMSNode) loc;
                    node.update();
                }
            }
        }
        );

        /**
         _serverProperties.addTreeSelectionListener(new TreeSelectionListener()
         {
         public void valueChanged(TreeSelectionEvent e)
         {
         TreePath path = e.getPath();
         Object loc = path.getLastPathComponent();
         if (loc instanceof OpenJMSNode)
         {
         OpenJMSNode node = (OpenJMSNode)loc;
         System.out.println(node);
         }
         }
         }
         );

         **/
        _exit.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                exitAdmin(evt);
            }
        }
        );


        _refresh.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                refresh(evt);
            }
        }
        );


        _online.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                onlineConnect(evt);
            }
        }
        );

        _offline.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                offlineConnect(evt);
            }
        }
        );

        _disconnect.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                disconnect(evt);
            }
        }
        );

        _startup.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                startup(evt);
            }
        }
        );

        _shutdown.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                try {
                    AbstractAdminConnection.instance().stopServer();
                    setConnected(false, null);
                } catch (NullPointerException err) {
                    JOptionPane.showMessageDialog
                        (_file, "Must connect with online mode \nto "
                        + "shutdown server", "Shutdown Error",
                            JOptionPane.ERROR_MESSAGE);
                }
            }
        }
        );
    }

    /**
     * The main entry point for this admin gui.
     * The main form and any support dialogs are created.
     * An initial size is given, and the gui placed in the middle of the screen
     *
     * @param args the command line arguments
     *
     */
    public static void main(String args[]) {
        try {
            CommandLine cmdline = new CommandLine(args);

            boolean helpSet = cmdline.exists("help");
            boolean configSet = cmdline.exists("config");
            boolean stopServer = cmdline.exists("stopServer");
            String username = cmdline.value("u");
            String password = cmdline.value("p");

            if (helpSet) {
                usage();
            } else if (!configSet && !stopServer && args.length != 0) {
                // invalid argument specified
                usage();
            } else {
                String configFile = cmdline.value("config");
                if (configFile == null) {
                    String home = getOpenJMSHome();
                    configFile = home + "/config/openjms.xml";
                }
                ConfigurationManager.setConfig(configFile);
                Configuration config = ConfigurationManager.getConfig();
                String path = config.getLoggerConfiguration().getFile();
                if (path != null) {
                    DOMConfigurator.configure(path);
                }
                AdminConfiguration adminConfig = null;

                adminConfig = config.getAdminConfiguration();
                _serverStart = adminConfig.getScript();
                _serverConfig = adminConfig.getConfig();
                if (_serverConfig == null) {
                    _serverConfig = configFile;
                }

                if (stopServer) {
                    // this is a special mode that will just attempt
                    // a connection to the server and stop it. No GUI
                    
                    new OnlineConnection(username, password);
                    AbstractAdminConnection.instance().stopServer();
                } else {
                    AdminMgr admin = new AdminMgr(configFile);
                    QueryDialog.create(admin);
                    CreateQueueDialog.create(admin);
                    CreateTopicDialog.create(admin);
                    CreateLogonDialog.create(admin);
                    CreateUserDialog.create(admin);
                    ChangePasswordDialog.create(admin);
                    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
                    // About center of screen
                    admin.setLocation(screen.width / 2 - 150, screen.height / 2 - 150);
                    admin.setSize(300, 300);
                    admin.invalidate();
                    admin.show();
                }
            }
        } catch (Exception err) {
            err.printStackTrace();
            System.err.println("Failed to initialize AdminMgr.\nExiting....");
        }
    }

    /**
     * Print out information on running this sevice
     */
    static protected void usage() {
        PrintStream out = System.out;

        out.println("\n\n");
        out.println("=====================================================");
        out.println("Usage information for " + AdminMgr.class.getName());
        out.println("=====================================================");
        out.println("\n" + AdminMgr.class.getName());
        out.println("    [-help | -config <xml config file>]\n");
        out.println("\t-help   displays this screen\n");
        out.println("\t-config file name of xml-based config file\n");
    }

    /**
     * A simple class to re-direct the output stream from JMS to the local
     * console
     */
    class StreamRedirect extends Thread {

        InputStream is_;

        StreamRedirect(InputStream is) {
            is_ = is;
        }

        public void run() {
            try {
                InputStreamReader isr = new InputStreamReader(is_);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null) {
                    System.out.println(line);
                }
            } catch (IOException ioe) {
                ioe.printStackTrace();
            }
        }
    }

    private String[] getStartCommand() throws Exception {
        ArrayList args = new ArrayList();

        if (_serverStart != null) {
            Perl5Compiler compiler = new Perl5Compiler();
            Pattern pattern = compiler.compile("'.*'|[^\\s]*");
            Perl5Matcher matcher = new Perl5Matcher();
            PatternMatcherInput input = new PatternMatcherInput(_serverStart);

            while (matcher.contains(input, pattern)) {
                String arg = matcher.getMatch().toString();
                if (arg.startsWith("'") && arg.endsWith("'")) {
                    arg = arg.substring(1, arg.length() - 1);
                }
                args.add(arg);
            }
        }

        args.add("-config");
        args.add(_serverConfig);

        return (String[]) args.toArray(new String[0]);
    }

    /**
     * Returns the value of the openjms.home environment variable
     */
    private static String getOpenJMSHome() {
        return System.getProperty("openjms.home",
            System.getProperty("user.dir"));
    }

} //-- AdminMgr

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄色91视频| 成人av网站在线观看免费| 国产成人在线视频网站| 一本久久a久久免费精品不卡| 欧美一区二区高清| 亚洲日本一区二区| 国产主播一区二区三区| 欧美日韩一区二区在线观看 | 日本sm残虐另类| 99精品在线观看视频| 精品久久久久久久一区二区蜜臀| 一区二区三区小说| 99国产精品久久久久| 久久人人97超碰com| 免费的成人av| 欧美日韩国产a| 亚洲图片欧美一区| 色综合久久天天综合网| 国产精品黄色在线观看| 国产成人h网站| 亚洲精品一区二区三区在线观看 | 欧美国产一区二区在线观看| 奇米色777欧美一区二区| 欧美无砖砖区免费| 亚洲欧美日韩电影| 91影院在线观看| 国产精品免费视频网站| 国产成人aaaa| 欧美激情一区二区三区不卡| 国产一区二区三区香蕉| 久久蜜臀中文字幕| 国产一区二区福利| 久久精品在线免费观看| 国产麻豆午夜三级精品| 久久久另类综合| av不卡免费在线观看| 久久这里都是精品| 国产成人免费视频一区| 国产女人水真多18毛片18精品视频| 国产麻豆视频一区二区| 国产女人aaa级久久久级| 国产凹凸在线观看一区二区| 国产精品久久午夜夜伦鲁鲁| 99久久精品国产一区二区三区| 一区在线中文字幕| 欧美午夜免费电影| 欧美aa在线视频| 久久精品在线观看| av激情成人网| 午夜一区二区三区视频| 日韩午夜精品电影| 国产91富婆露脸刺激对白| 国产精品久久久久久亚洲伦| 色综合天天天天做夜夜夜夜做| 亚洲一区二区三区中文字幕在线| 欧美色区777第一页| 老司机午夜精品| 国产亚洲精品bt天堂精选| 91丨九色丨国产丨porny| 亚洲福利视频导航| www久久精品| 91在线云播放| 蜜臂av日日欢夜夜爽一区| 国产女主播视频一区二区| 91久久精品一区二区三区| 欧美aaa在线| 国产精品久久免费看| 欧美久久久久久蜜桃| 国产精品18久久久久久久久久久久| 亚洲天堂a在线| 精品美女一区二区三区| 一本久久精品一区二区| 国产美女在线精品| 午夜激情久久久| 中文字幕第一区第二区| 制服丝袜亚洲播放| 成人高清视频免费观看| 男女男精品网站| 1区2区3区精品视频| 精品日本一线二线三线不卡| 91久久精品一区二区| 国产在线精品一区二区| 亚洲国产一区二区三区| 国产欧美一区视频| www成人在线观看| 91久久精品一区二区二区| 国产精品综合av一区二区国产馆| 亚洲一区二区视频在线| 欧美国产一区视频在线观看| 欧美一级欧美三级| 精品视频一区二区三区免费| 成人黄色av电影| 美女视频黄久久| 天天av天天翘天天综合网 | 国内欧美视频一区二区| 亚洲一区二区三区爽爽爽爽爽| 久久综合色天天久久综合图片| 欧美又粗又大又爽| 91一区一区三区| 国产91在线|亚洲| 国内精品嫩模私拍在线| 免费在线视频一区| 亚洲成人资源在线| 亚洲国产cao| 亚洲精品国产视频| 亚洲品质自拍视频| 亚洲视频在线一区| 亚洲欧洲精品天堂一级| 国产精品美女久久久久高潮| 国产三级三级三级精品8ⅰ区| 日韩精品一区二区三区视频在线观看 | 国产99久久久国产精品免费看| 青青青伊人色综合久久| 日韩激情视频网站| 日韩av中文字幕一区二区三区| 亚洲一区二区在线免费观看视频 | 99久久精品国产观看| zzijzzij亚洲日本少妇熟睡| 北岛玲一区二区三区四区| 91视频com| 欧美亚洲禁片免费| 欧美日韩国产高清一区| 欧美精品久久久久久久久老牛影院| 欧美日韩在线免费视频| 欧美日韩高清在线| 日韩精品中文字幕一区二区三区| 日韩一二三区视频| 亚洲精品一区二区三区在线观看| 久久嫩草精品久久久精品| 久久久99久久精品欧美| 国产精品嫩草影院av蜜臀| 亚洲日本va在线观看| 亚洲欧美日韩一区二区三区在线观看| 亚洲欧美日韩国产另类专区| 亚洲一级二级在线| 久久国产精品一区二区| 欧美午夜精品理论片a级按摩| 色国产综合视频| 日韩午夜三级在线| 国产农村妇女精品| 一区二区欧美国产| 蜜桃传媒麻豆第一区在线观看| 国产福利一区二区三区视频| 91影院在线观看| 日韩亚洲欧美一区| 亚洲国产精品v| 香蕉乱码成人久久天堂爱免费| 狂野欧美性猛交blacked| 成人开心网精品视频| 欧美日韩午夜精品| 久久久国产精品麻豆| 一区二区三区精品视频| 免费人成网站在线观看欧美高清| 国产高清精品在线| 欧美视频一区二区在线观看| 久久久久久久久免费| 亚洲主播在线播放| 国内精品写真在线观看| 欧美揉bbbbb揉bbbbb| 国产区在线观看成人精品 | 国产亚洲欧美中文| 一区二区三区**美女毛片| 精品在线免费观看| 色先锋资源久久综合| 精品国产乱码久久久久久蜜臀| 亚洲啪啪综合av一区二区三区| 精品一区二区三区视频在线观看| 91丨九色丨蝌蚪富婆spa| 2021国产精品久久精品| 亚洲一二三四区| 不卡一区二区在线| 精品国产第一区二区三区观看体验| 一区二区三区.www| 成人av资源站| 久久综合精品国产一区二区三区| 亚洲成人午夜影院| 99久久精品国产麻豆演员表| 久久久久久麻豆| 老司机精品视频导航| 欧美日韩精品欧美日韩精品一综合| 欧美国产97人人爽人人喊| 久久se这里有精品| 7777精品伊人久久久大香线蕉完整版| 国产精品国产三级国产aⅴ原创| 久久99蜜桃精品| 日韩美女天天操| 青青草97国产精品免费观看无弹窗版| 91久久精品午夜一区二区| 最新国产の精品合集bt伙计| 福利电影一区二区三区| 久久综合一区二区| 韩国av一区二区| 精品国产第一区二区三区观看体验| 日本成人在线看| 欧美老女人第四色| 日韩在线一二三区| 6080亚洲精品一区二区| 婷婷成人激情在线网| 91麻豆精品国产91久久久久| 亚洲成人手机在线|