versionwrapper.java
来自「提供ESB 应用mule源代码 提供ESB 应用mule源代码」· Java 代码 · 共 61 行
JAVA
61 行
/* * $Id: VersionWrapper.java 10699 2008-02-05 15:19:32Z romikk $ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */package org.mule.module.boot;import org.mule.config.i18n.CoreMessages;import org.tanukisoftware.wrapper.WrapperListener;import org.tanukisoftware.wrapper.WrapperManager;/** * There is a need to exit from wrapper * This is a good place for other information message */public class VersionWrapper implements WrapperListener{ public Integer start(String[] args) { try { System.out.println(CoreMessages.productInformation()); } catch (Exception e) { e.printStackTrace(); return new Integer(1); } return null; } public int stop(int exitCode) { return exitCode; } public void controlEvent(int event) { if (WrapperManager.isControlledByNativeWrapper()) { // The Wrapper will take care of this event } else { // We are not being controlled by the Wrapper, so // handle the event ourselves. if ((event == WrapperManager.WRAPPER_CTRL_C_EVENT) || (event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT) || (event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT)) { WrapperManager.stop(0); } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?