javax.ws.rs.core.Configuration.isEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(144)

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

Configuration.isEnabled介绍

[英]Check if a Feature instance of featureClass class has been previously enabled in the runtime configuration context.

Method returns true in case any instance of the featureClass class is already present among the features previously successfully enabled in the configuration context.
[中]检查featureClass的功能实例之前是否已在运行时配置上下文中启用。
如果featureClass类的任何实例已经存在于先前在配置上下文中成功启用的功能中,则方法返回true。

代码示例

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

@Override
public boolean configure(final FeatureContext context) {
  if (context.getConfiguration().isEnabled(this.getClass())) {
    return false;
  }
  switch (context.getConfiguration().getRuntimeType()) {
    case CLIENT:
      context.register(EventInputReader.class);
      context.register(InboundEventReader.class);
      break;
    case SERVER:
      context.register(OutboundEventWriter.class);
      context.register(new SseBinder());
      context.register(SseEventSinkValueParamProvider.class, ValueParamProvider.class);
      break;
  }
  return true;
}

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

if (Feature.class.isAssignableFrom(clazz) && config.isEnabled((Class<? extends Feature>) clazz)) {
  this.disableMetaProviderConfiguration = true;
if (instance instanceof Feature && config.isEnabled((Feature) instance)) {
  this.disableMetaProviderConfiguration = true;

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

if (Feature.class.isAssignableFrom(clazz) && config.isEnabled((Class<? extends Feature>) clazz)) {
  this.disableMetaProviderConfiguration = true;
if (instance instanceof Feature && config.isEnabled((Feature) instance)) {
  this.disableMetaProviderConfiguration = true;

代码示例来源:origin: resteasy/Resteasy

@Override
public boolean isEnabled(Feature feature)
{
 return delegate.isEnabled(feature);
}

代码示例来源:origin: resteasy/Resteasy

@Override
public boolean isEnabled(Class<? extends Feature> featureClass)
{
 return delegate.isEnabled(featureClass);
}

代码示例来源:origin: io.smallrye/smallrye-rest-client

@Override
public boolean isEnabled(Class<? extends Feature> featureClass) {
  return delegate.isEnabled(featureClass);
}

代码示例来源:origin: org.jboss.resteasy/resteasy-client-microprofile

@Override
public boolean isEnabled(Feature feature)
{
 return delegate.isEnabled(feature);
}

代码示例来源:origin: org.jboss.resteasy/resteasy-client-microprofile

@Override
public boolean isEnabled(Class<? extends Feature> featureClass)
{
 return delegate.isEnabled(featureClass);
}

代码示例来源:origin: io.thorntail/microprofile-restclient-api

@Override
public boolean isEnabled(Class<? extends Feature> featureClass) {
  return delegate.isEnabled(featureClass);
}

代码示例来源:origin: io.smallrye/smallrye-rest-client

@Override
public boolean isEnabled(Feature feature) {
  return delegate.isEnabled(feature);
}

代码示例来源:origin: io.thorntail/microprofile-restclient-api

@Override
public boolean isEnabled(Feature feature) {
  return delegate.isEnabled(feature);
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public boolean isEnabled(final Feature feature) {
  return get().isEnabled(feature);
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public boolean isEnabled(final Class<? extends Feature> featureClass) {
  return get().isEnabled(featureClass);
}

代码示例来源:origin: openhab/openhab-core

@Override
  public boolean configure(FeatureContext context) {
    if (context.getConfiguration().isEnabled(BlockingAsyncFeature.class)) {
      return false;
    }

    context.register(new BlockingAsyncBinder());

    return true;
  }
}

代码示例来源:origin: org.eclipse.smarthome.io/org.eclipse.smarthome.io.rest.sse

@Override
  public boolean configure(FeatureContext context) {
    if (context.getConfiguration().isEnabled(BlockingAsyncFeature.class)) {
      return false;
    }

    context.register(new BlockingAsyncBinder());

    return true;
  }
}

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

@Override
public boolean configure(final FeatureContext context) {
  if (context.getConfiguration().isEnabled(this.getClass())) {
    return false;
  }
  switch (context.getConfiguration().getRuntimeType()) {
    case CLIENT:
      context.register(EventInputReader.class);
      context.register(InboundEventReader.class);
      break;
    case SERVER:
      context.register(OutboundEventWriter.class);
      break;
  }
  return true;
}

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

@Override
public boolean configure(final FeatureContext context) {
  if (context.getConfiguration().isEnabled(this.getClass())) {
    return false;
  }
  switch (context.getConfiguration().getRuntimeType()) {
    case CLIENT:
      context.register(EventInputReader.class);
      context.register(InboundEventReader.class);
      break;
    case SERVER:
      context.register(OutboundEventWriter.class);
      break;
  }
  return true;
}

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

@Override
public boolean configure(final FeatureContext context) {
  if (context.getConfiguration().isEnabled(this.getClass())) {
    return false;
  }
  switch (context.getConfiguration().getRuntimeType()) {
    case CLIENT:
      context.register(EventInputReader.class);
      context.register(InboundEventReader.class);
      break;
    case SERVER:
      context.register(OutboundEventWriter.class);
      break;
  }
  return true;
}

代码示例来源:origin: apache/cxf

public ConfigurationImpl(Configuration parent) {
  if (parent != null) {
    this.props.putAll(parent.getProperties());
    this.runtimeType = parent.getRuntimeType();
    Set<Class<?>> providerClasses = new HashSet<>(parent.getClasses());
    for (Object o : parent.getInstances()) {
      if (!(o instanceof Feature)) {
        registerParentProvider(o, parent);
      } else {
        Feature f = (Feature)o;
        features.put(f, parent.isEnabled(f));
      }
      providerClasses.remove(o.getClass());
    }
    for (Class<?> cls : providerClasses) {
      registerParentProvider(createProvider(cls), parent);
    }
  }
}

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

if (Feature.class.isAssignableFrom(clazz) && config.isEnabled((Class<? extends Feature>) clazz)) {
  this.disableMetaProviderConfiguration = true;
if (instance instanceof Feature && config.isEnabled((Feature) instance)) {
  this.disableMetaProviderConfiguration = true;

相关文章