本文整理汇总了Java中javax.enterprise.context.Destroyed类的典型用法代码示例。如果您正苦于以下问题:Java Destroyed类的具体用法?Java Destroyed怎么用?Java Destroyed使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Destroyed类属于javax.enterprise.context包,在下文中一共展示了Destroyed类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: disableRecovery
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
/**
* When the deployment is unloaded unregister for recovery
*
* @param init a javax.servlet.ServletContext
*/
void disableRecovery(@Observes @Destroyed(ApplicationScoped.class) Object init) {
assert lraRecoveryModule != null;
Implementations.uninstall();
RecoveryManager.manager().removeModule(lraRecoveryModule, false);
lraRecoveryModule = null;
if (LRALogger.logger.isDebugEnabled())
LRALogger.logger.debugf("LRAServicve.disableRecovery%n"); }
示例2: shutdown
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
void shutdown(@Observes @Destroyed(ApplicationScoped.class) Object event) {
System.out.println(
" _____ _ _ _ \n"
+ "| __| |_ _ _| |_ _| |___ _ _ _ ___ \n"
+ "|__ | | | | _| . | . | | | | |_ _ _ \n"
+ "|_____|_|_|___|_| |___|___|_____|_|_|_|_|_|");
}
示例3: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object ignore) {
log.debugf("Destroying [%s]", this.getClass().getName());
if (feedSessionListenerProducer != null) {
wsEndpoints.getFeedSessions().removeWsSessionListenerProducer(feedSessionListenerProducer);
}
if (uiClientSessionListenerProducer != null) {
wsEndpoints.getUiClientSessions().removeWsSessionListenerProducer(uiClientSessionListenerProducer);
}
}
示例4: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) {
if (localCacheManager != null) {
localCacheManager.stop();
}
if (cacheManager != null) {
cacheManager.stop();
}
if (cacheManagerForIndexableCaches != null) {
cacheManagerForIndexableCaches.stop();
}
}
示例5: processApplicationScopedDestroyed
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void processApplicationScopedDestroyed(
@Observes @Destroyed(ApplicationScoped.class) ServletContext payload) {
logger.info("destroyed the ApplicationBean");
applicationBean.incrementCounter();
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:6,代码来源:InitializeApplicationObserver.java
示例6: processDependentScopedDestroyed
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void processDependentScopedDestroyed(@Observes @Destroyed(ApplicationScoped.class) ServletContext payload) {
logger.info("destroyed the DependentBean");
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:4,代码来源:InitializeDependentObserver.java
示例7: observeRequestDestroyed
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
void observeRequestDestroyed(@Observes @Destroyed(RequestScoped.class) Object event) {
log.tracef("observeRequestDestroyed, event=%s", event);
}
示例8: shutdown
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void shutdown(@Observes @Destroyed(ApplicationScoped.class) Object doesntMatter) {
this.cacheManager.destroyCache(CONFIGURATION);
this.cachingProvider.close();
}
示例9: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object ignore) {
log.debugf("Destroying [%s]", this.getClass().getName());
this.uiClientSessions.destroy();
this.feedSessions.destroy();
}
示例10: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) {
producer.close();
}
示例11: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) {
consumer.shutdown();
}
示例12: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) {
subscription.unsubscribe();
}
示例13: destroy
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void destroy(@Observes @Destroyed(ApplicationScoped.class) Object init) {
Log.log(Level.FINEST, this, "CDI Shutting down kafka polling thread");
pollingThread.cancel(true);
Log.log(Level.FINEST, this, "CDI Closing kafka consumer.");
consumer.close();
}
示例14: afterDestroyed
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void afterDestroyed(@Observes @Destroyed(ApplicationScoped.class) Object event) {
future.cancel(false);
}
示例15: shutdown
import javax.enterprise.context.Destroyed; //导入依赖的package包/类
public void shutdown(@Observes @Destroyed(ApplicationScoped.class) Object doesntMatter) {
this.cachingProvider.close();
}