org.glassfish.jersey.server.monitoring.ApplicationEvent.getType()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.glassfish.jersey.server.monitoring.ApplicationEvent.getType()方法的一些代码示例,展示了ApplicationEvent.getType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationEvent.getType()方法的具体详情如下:
包路径:org.glassfish.jersey.server.monitoring.ApplicationEvent
类名称:ApplicationEvent
方法名:getType

ApplicationEvent.getType介绍

[英]Return the type of the event.
[中]返回事件的类型。

代码示例

代码示例来源:origin: jersey/jersey

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: jersey/jersey

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: dropwizard/dropwizard

@Override
public void onEvent(ApplicationEvent event) {
  if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
    resources = event.getResourceModel().getResources();
    providers = event.getProviders();
    final String resourceClasses = resources.stream()
        .map(x -> x.getClass().getCanonicalName())
        .collect(Collectors.joining(", "));
    final String providerClasses = providers.stream()
        .map(Class::getCanonicalName)
        .collect(Collectors.joining(", "));
    LOGGER.debug("resources = {}", resourceClasses);
    LOGGER.debug("providers = {}", providerClasses);
    LOGGER.info(getEndpointsInfo());
  }
}

代码示例来源:origin: jersey/jersey

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case INITIALIZATION_START:

代码示例来源:origin: jersey/jersey

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case INITIALIZATION_START:

代码示例来源:origin: org.glassfish.jersey.core/jersey-server

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: hugegraph/hugegraph

@Override
public void onEvent(ApplicationEvent event) {
  if (event.getType() == this.EVENT_INITED) {
    GraphManagerFactory.this.manager = new GraphManager(conf);
  }
}

代码示例来源:origin: org.glassfish.jersey.core/jersey-server

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case INITIALIZATION_START:

代码示例来源:origin: icode/ameba

/**
 * <p>getType.</p>
 *
 * @return a {@link org.glassfish.jersey.server.monitoring.ApplicationEvent.Type} object.
 */
public Type getType() {
  return event.getType();
}

代码示例来源:origin: dremio/dremio-oss

@Override
public void onEvent(ApplicationEvent event) {
 logger.info("ApplicationEventListener.onEvent " + event.getType());
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: soabase/soabase

@Override
public void onEvent(ApplicationEvent event)
{
  if ( event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED )
  {
    loggingConfig.logComponents();
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: io.dropwizard/dropwizard-jersey

@Override
public void onEvent(ApplicationEvent event) {
  if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
    config.logComponents();
  }
}

代码示例来源:origin: org.glassfish.jersey.bundles/jaxrs-ri

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public void onEvent(final ApplicationEvent event) {
  final ApplicationEvent.Type type = event.getType();
  switch (type) {
    case RELOAD_FINISHED:
    case INITIALIZATION_FINISHED:
      processApplicationStatistics(event);
      break;
  }
}

代码示例来源:origin: io.dropwizard.metrics/metrics-jersey2

@Override
public void onEvent(ApplicationEvent event) {
  if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
    registerMetricsForModel(event.getResourceModel());
  }
}

代码示例来源:origin: yahoo/fili

@Override
public void onEvent(ApplicationEvent applicationEvent) {
  if (parameterMap == null && applicationEvent.getType() == ApplicationEvent.Type.INITIALIZATION_START) {
    Set<Class<?>> providers = applicationEvent.getProviders();
    ClassLoader classLoader = applicationEvent.getResourceConfig().getClassLoader();
    parameterMap = buildParameterMap(providers, classLoader);
  }
}

代码示例来源:origin: com.thesett.jenerator.utils/jenerator_util_dropwizard_0.9

public void onEvent(ApplicationEvent event) {
  if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
    for (Resource resource : event.getResourceModel().getResources()) {
      for (ResourceMethod method : resource.getAllMethods()) {
        registerUnitOfWorkWithDetachAnnotations(method);
      }
      for (Resource childResource : resource.getChildResources()) {
        for (ResourceMethod method : childResource.getAllMethods()) {
          registerUnitOfWorkWithDetachAnnotations(method);
        }
      }
    }
  }
}

代码示例来源:origin: com.thesett.jenerator.utils/jenerator_util_dropwizard_0.9

public void onEvent(ApplicationEvent event) {
  if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
    for (Resource resource : event.getResourceModel().getResources()) {
      for (ResourceMethod method : resource.getAllMethods()) {
        registerAuditedMethodAnnotations(method);
      }
      for (Resource childResource : resource.getChildResources()) {
        for (ResourceMethod method : childResource.getAllMethods()) {
          registerAuditedMethodAnnotations(method);
        }
      }
    }
  }
}

相关文章