📄 appsservice.java
字号:
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.server;
import javax.management.*;
import org.jboss.system.*;
import org.compiere.*;
import org.compiere.db.*;
import org.compiere.util.*;
/**
* Application Service
*
* @author Jorg Janke
* @version $Id: AppsService.java,v 1.18 2002/11/17 00:51:49 jjanke Exp $
*/
public class AppsService extends ServiceMBeanSupport
implements AppsServiceMBean, Runnable
{
/**
*
*/
public AppsService()
{
} // AppsService
/**
* Create Service
* @throws Exception
*/
protected void createService() throws Exception
{
// p_worker = new Thread (this, getName());
// p_worker.setDaemon(true);
} // createService
/**
* Start Service
* @throws Exception
*/
protected void startService() throws Exception
{
// p_worker.start();
} // startService
/**
* Stop Service
* @throws Exception
*/
protected void stopService() throws Exception
{
// p_worker.interrupt();
}
/**
* Destroy Service
* @throws Exception
*/
protected void destroyService() throws Exception
{
/**
while (p_worker.isAlive())
{
p_worker.interrupt();
Thread.currentThread().sleep(1000);
}
p_worker = null;
**/
} // destroyService
/**
* Run
*/
public void run()
{
boolean running = true;
while (running)
{
try
{
// m_count++;
// put the thread to sleep for the interval specified
Thread.currentThread().sleep(1000);
}
catch (InterruptedException e)
{
running = false;
}
} // while running
} // run
/*************************************************************************/
/**
* Get Statistics
* @return statistical info
*/
public String getStatistics()
{
return "Count";// + m_count;
} // getStatistics
/*************************************************************************/
} // AppsService
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -