本文整理汇总了Java中org.mortbay.component.LifeCycle类的典型用法代码示例。如果您正苦于以下问题:Java LifeCycle类的具体用法?Java LifeCycle怎么用?Java LifeCycle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LifeCycle类属于org.mortbay.component包,在下文中一共展示了LifeCycle类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: publishServerAsAService
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
private ServiceRegistration publishServerAsAService(Server server) {
Properties props = new Properties();
// put some extra properties to easily identify the service
props.put(Constants.SERVICE_VENDOR, "Spring Dynamic Modules");
props.put(Constants.SERVICE_DESCRIPTION, "Jetty " + Server.getVersion());
props.put(Constants.BUNDLE_VERSION, Server.getVersion());
props.put(Constants.BUNDLE_NAME, bundleContext.getBundle().getSymbolicName());
// spring-dm specific property
props.put("org.springframework.osgi.bean.name", "jetty-server");
// publish just the interfaces and the major classes (server/handlerWrapper)
String[] classes = new String[] { Server.class.getName(), HandlerWrapper.class.getName(),
Attributes.class.getName(), HandlerContainer.class.getName(), Handler.class.getName(),
LifeCycle.class.getName() };
return bundleContext.registerService(classes, server, props);
}
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:18,代码来源:Activator.java
示例2: setThreadPool
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
/**
* Set the threadpool.
* If the {@link ThreadPool} is a {@link LifeCycle}, then it is started by this method.
*
* @param pool
*/
public void setThreadPool(ThreadPool pool)
{
try
{
if (pool instanceof LifeCycle)
if (!((LifeCycle)pool).isStarted())
((LifeCycle)pool).start();
}
catch(Exception e)
{
throw new IllegalStateException(e);
}
_threadPool = pool;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:BayeuxService.java
示例3: lifeCycleStopping
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
@Override
public void lifeCycleStopping(LifeCycle arg0) {
logger.debug("Server stopping");
}
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:5,代码来源:JsTestDriverServerImpl.java
示例4: lifeCycleStopped
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
@Override
public void lifeCycleStopped(LifeCycle arg0) {
notifyListeners(STOPPED_NOTIFICATION);
logger.debug("Server stopped");
}
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:6,代码来源:JsTestDriverServerImpl.java
示例5: lifeCycleStarting
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
@Override
public void lifeCycleStarting(LifeCycle arg0) {
logger.debug("Server starting");
}
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:5,代码来源:JsTestDriverServerImpl.java
示例6: lifeCycleStarted
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
@Override
public void lifeCycleStarted(LifeCycle arg0) {
notifyListeners(STARTED_NOTIFICATION);
logger.debug("Server started");
}
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:6,代码来源:JsTestDriverServerImpl.java
示例7: lifeCycleFailure
import org.mortbay.component.LifeCycle; //导入依赖的package包/类
@Override
public void lifeCycleFailure(LifeCycle arg0, Throwable arg1) {
logger.warn("Server failed", arg1);
}
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:5,代码来源:JsTestDriverServerImpl.java
注:本文中的org.mortbay.component.LifeCycle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论