当前位置: 首页>>代码示例>>Java>>正文


Java Event类代码示例

本文整理汇总了Java中org.xwiki.observation.event.Event的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Event类属于org.xwiki.observation.event包,在下文中一共展示了Event类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEvents

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public List<Event> getEvents() {
    return Arrays.<Event>asList(
            new ApplicationStartedEvent(),
            new ApplicationStoppedEvent()
    );
}
 
开发者ID:phenotips,项目名称:variant-store,代码行数:8,代码来源:VariantStoreInitializer.java

示例2: onEvent

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public void onEvent(Event event, Object o, Object o2) {
    // don't do anything, just injecting the service.
    if (event instanceof ApplicationStoppedEvent) {
        service.stop();
    }
}
 
开发者ID:phenotips,项目名称:variant-store,代码行数:8,代码来源:VariantStoreInitializer.java

示例3: FutureManager

import org.xwiki.observation.event.Event; //导入依赖的package包/类
/**
 * @param name The name of this future manager. Used to register it as an Event Listener
 * @param removalEvent The event that the future manger listens for. Causes the removal of a future from the
 *            manager.
 */
public FutureManager(String name, Event removalEvent)
{
    this.name = name;
    this.futures = new HashMap<>();
    this.removalEvent = removalEvent;

}
 
开发者ID:phenotips,项目名称:variant-store,代码行数:13,代码来源:FutureManager.java

示例4: onEvent

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public void onEvent(Event event, Object source, Object data)
{
    XWikiDocument doc = (XWikiDocument) source;

    String patientId = doc.getDocumentReference().getName();
    List<PatientMatch> matchesForPatient = this.matchStorageManager.loadMatchesByReferencePatientId(patientId);
    Session session = this.matchStorageManager.beginNotificationMarkingTransaction();
    this.matchStorageManager.deleteMatches(session, matchesForPatient);
    boolean successful = this.matchStorageManager.endNotificationMarkingTransaction(session);

    if (!successful) {
        this.logger.error("Error while deleting matches for patient ID ", patientId);
    }
}
 
开发者ID:phenotips,项目名称:patient-network,代码行数:16,代码来源:PatientMatchesRemover.java

示例5: getEvents

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public List<Event> getEvents()
{
    return Collections.<Event>singletonList(this.removalEvent);
}
 
开发者ID:phenotips,项目名称:variant-store,代码行数:6,代码来源:FutureManager.java

示例6: onEvent

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public void onEvent(Event event, Object source, Object data)
{
    this.futures.remove(((VCFEvent) event).getPatient().getId());
}
 
开发者ID:phenotips,项目名称:variant-store,代码行数:6,代码来源:FutureManager.java

示例7: getEvents

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public List<Event> getEvents()
{
    return Collections.<Event>singletonList(new ApplicationStartedEvent());
}
 
开发者ID:phenotips,项目名称:patient-network,代码行数:6,代码来源:ORMRegistrationHandler.java

示例8: onEvent

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public void onEvent(Event event, Object source, Object data)
{
    Configuration configuration = this.sessionFactory.getConfiguration();
    configuration.addAnnotatedClass(DefaultPatientMatch.class);
}
 
开发者ID:phenotips,项目名称:patient-network,代码行数:7,代码来源:ORMRegistrationHandler.java

示例9: onEvent

import org.xwiki.observation.event.Event; //导入依赖的package包/类
@Override
public void onEvent(Event event, Object source, Object data)
{
    this.sessionFactory.getConfiguration().addAnnotatedClass(Connection.class);
}
 
开发者ID:phenotips,项目名称:patient-network,代码行数:6,代码来源:ORMRegistrationHandler.java


注:本文中的org.xwiki.observation.event.Event类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。