org.glassfish.jersey.server.model.ResourceMethod.getSuspendTimeout()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(11.3k)|赞(0)|评价(0)|浏览(65)

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

ResourceMethod.getSuspendTimeout介绍

暂无

代码示例

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = new LinkedHashSet<>(originalMethod.getConsumedTypes());
  this.producedTypes = new LinkedHashSet<>(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = new LinkedHashSet<>(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = new LinkedHashSet<>(originalMethod.getConsumedTypes());
  this.producedTypes = new LinkedHashSet<>(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = new LinkedHashSet<>(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = new LinkedHashSet<>(originalMethod.getConsumedTypes());
  this.producedTypes = new LinkedHashSet<>(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = new LinkedHashSet<>(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

代码示例来源:origin: com.carecon.fabric3/fabric3-binding-rs-jersey

private void createMethod(Resource.Builder resourceBuilder,
             ResourceMethod template,
             F3ResourceHandler handler,
             String[] consumeTypes,
             String[] produceTypes) {
  ResourceMethod.Builder methodBuilder = resourceBuilder.addMethod(template.getHttpMethod());
  methodBuilder.consumes(template.getConsumedTypes());
  methodBuilder.consumes(consumeTypes);
  methodBuilder.produces(template.getProducedTypes());
  methodBuilder.produces(produceTypes);
  methodBuilder.handledBy(handler, template.getInvocable().getHandlingMethod());
  if (template.isSuspendDeclared()) {
    methodBuilder.suspended(template.getSuspendTimeout(), template.getSuspendTimeoutUnit());
  }
  if (template.isManagedAsyncDeclared()) {
    methodBuilder.managedAsync();
  }
}

代码示例来源:origin: org.fabric3/fabric3-binding-rs-jersey

private void createMethod(Resource.Builder resourceBuilder,
             ResourceMethod template,
             F3ResourceHandler handler,
             String[] consumeTypes,
             String[] produceTypes) {
  ResourceMethod.Builder methodBuilder = resourceBuilder.addMethod(template.getHttpMethod());
  methodBuilder.consumes(template.getConsumedTypes());
  methodBuilder.consumes(consumeTypes);
  methodBuilder.produces(template.getProducedTypes());
  methodBuilder.produces(produceTypes);
  methodBuilder.handledBy(handler, template.getInvocable().getHandlingMethod());
  if (template.isSuspendDeclared()) {
    methodBuilder.suspended(template.getSuspendTimeout(), template.getSuspendTimeoutUnit());
  }
  if (template.isManagedAsyncDeclared()) {
    methodBuilder.managedAsync();
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = new LinkedHashSet<>(originalMethod.getConsumedTypes());
  this.producedTypes = new LinkedHashSet<>(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = new LinkedHashSet<>(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = Sets.newLinkedHashSet(originalMethod.getConsumedTypes());
  this.producedTypes = Sets.newLinkedHashSet(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = Sets.newLinkedHashSet(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = Sets.newLinkedHashSet(originalMethod.getConsumedTypes());
  this.producedTypes = Sets.newLinkedHashSet(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = Sets.newLinkedHashSet(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

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

/**
 * Create a builder from an existing resource method model.
 *
 * @param parent         parent resource model builder.
 * @param originalMethod existing resource method model to create the builder from.
 */
/* package */ Builder(final Resource.Builder parent, ResourceMethod originalMethod) {
  this.parent = parent;
  this.consumedTypes = Sets.newLinkedHashSet(originalMethod.getConsumedTypes());
  this.producedTypes = Sets.newLinkedHashSet(originalMethod.getProducedTypes());
  this.suspended = originalMethod.isSuspendDeclared();
  this.suspendTimeout = originalMethod.getSuspendTimeout();
  this.suspendTimeoutUnit = originalMethod.getSuspendTimeoutUnit();
  this.handlerParameters = Sets.newLinkedHashSet(originalMethod.getInvocable().getHandler().getParameters());
  this.nameBindings = originalMethod.getNameBindings();
  this.httpMethod = originalMethod.getHttpMethod();
  this.managedAsync = originalMethod.isManagedAsyncDeclared();
  Invocable invocable = originalMethod.getInvocable();
  this.handlingMethod = invocable.getHandlingMethod();
  this.encodedParams = false;
  this.routingResponseType = invocable.getRoutingResponseType();
  this.extended = originalMethod.isExtended();
  Method handlerMethod = invocable.getDefinitionMethod();
  MethodHandler handler = invocable.getHandler();
  if (handler.isClassBased()) {
    handledBy(handler.getHandlerClass(), handlerMethod);
  } else {
    handledBy(handler.getHandlerInstance(), handlerMethod);
  }
}

相关文章