public static final class ResourceMethod.Builder extends Object
| Modifier and Type | Method and Description | 
|---|---|
ResourceMethod | 
build()
Build the resource method model and register it with the parent
  
Resource.Builder. | 
ResourceMethod.Builder | 
consumes(Collection<MediaType> types)
Add consumed media types supported by the component. 
 | 
ResourceMethod.Builder | 
consumes(MediaType... types)
Add consumed media types supported by the component. 
 | 
ResourceMethod.Builder | 
consumes(String... types)
Add consumed media types supported by the component. 
 | 
ResourceMethod.Builder | 
encodedParameters(boolean value)
If set to  
true, the parameter values will not be automatically
 decoded. | 
ResourceMethod.Builder | 
extended(boolean extended)
Get the flag indicating whether the resource method is extended or is a core of exposed RESTful API. 
 | 
ResourceMethod.Builder | 
handledBy(Class<?> handlerClass,
         Method method)
Define a resource method handler binding. 
 | 
ResourceMethod.Builder | 
handledBy(Class<? extends Inflector> inflectorClass)
Define an inflector-based resource method handler binding. 
 | 
ResourceMethod.Builder | 
handledBy(Inflector<ContainerRequestContext,?> inflector)
Define an inflector-based resource method handler binding. 
 | 
ResourceMethod.Builder | 
handledBy(Object handlerInstance,
         Method method)
Define a resource method handler binding. 
 | 
ResourceMethod.Builder | 
handlerParameters(Collection<Parameter> parameters)
Parameters defined on the handler (i.e. not in the handling method), e.g. via property setters or fields. 
 | 
ResourceMethod.Builder | 
handlingMethod(Method handlingMethod)
Define a specific method of the handling class that will be executed. 
 | 
ResourceMethod.Builder | 
httpMethod(String name)
Set the associated HTTP method name. 
 | 
ResourceMethod.Builder | 
managedAsync()
Set the managed async required flag on the method model to  
true. | 
ResourceMethod.Builder | 
nameBindings(Annotation... nameBindings)
Adds name bindings. 
 | 
ResourceMethod.Builder | 
nameBindings(Class<? extends Annotation>... nameBindings)
Adds name bindings. 
 | 
ResourceMethod.Builder | 
nameBindings(Collection<Class<? extends Annotation>> nameBindings)
Adds name bindings. 
 | 
ResourceMethod.Builder | 
produces(Collection<MediaType> types)
Add produced media types supported by the component. 
 | 
ResourceMethod.Builder | 
produces(MediaType... types)
Add produced media types supported by the component. 
 | 
ResourceMethod.Builder | 
produces(String... types)
Add produced media types supported by the component. 
 | 
ResourceMethod.Builder | 
routingResponseType(Type routingResponseType)
Define the response entity type used during the routing for
 selection of the resource methods. 
 | 
ResourceMethod.Builder | 
sse()
Set the SSE flag on the method model to  
true. | 
ResourceMethod.Builder | 
suspended(long timeout,
         TimeUnit unit)
Mark the component for suspending. 
 | 
public ResourceMethod.Builder httpMethod(String name)
name - HTTP method name.public ResourceMethod.Builder produces(String... types)
types - produced media types.public ResourceMethod.Builder produces(MediaType... types)
types - produced media types.public ResourceMethod.Builder produces(Collection<MediaType> types)
types - produced media types.public ResourceMethod.Builder consumes(String... types)
types - consumed media types.public ResourceMethod.Builder consumes(MediaType... types)
types - consumed media types.public ResourceMethod.Builder consumes(Collection<MediaType> types)
types - consumed media types.public ResourceMethod.Builder nameBindings(Collection<Class<? extends Annotation>> nameBindings)
NameBinding
 meta-annotation will be ignored.nameBindings - collection of name binding annotation types.@SafeVarargs public final ResourceMethod.Builder nameBindings(Class<? extends Annotation>... nameBindings)
NameBinding
 meta-annotation will be ignored.nameBindings - name binding annotation types.public ResourceMethod.Builder nameBindings(Annotation... nameBindings)
NameBinding
 meta-annotation will be ignored.nameBindings - name binding annotations.public ResourceMethod.Builder suspended(long timeout, TimeUnit unit)
timeout - suspend timeout value.unit - suspend timeout time unit.public ResourceMethod.Builder sse()
true.public ResourceMethod.Builder managedAsync()
true.public ResourceMethod.Builder encodedParameters(boolean value)
true, the parameter values will not be automatically
 decoded.
 
 Defaults to false.value - true if the automatic parameter decoding should be
              disabled, false otherwise.Encodedpublic ResourceMethod.Builder handledBy(Class<?> handlerClass, Method method)
handlerClass - concrete resource method handler class.method - method that will be executed as a resource method. The parameters initializes
                     invocable
                     definition method.public ResourceMethod.Builder handledBy(Object handlerInstance, Method method)
handlerInstance - concrete resource method handler instance.method - handling method.public ResourceMethod.Builder handledBy(Inflector<ContainerRequestContext,?> inflector)
inflector - inflector handling the resource method.public ResourceMethod.Builder handledBy(Class<? extends Inflector> inflectorClass)
inflectorClass - class of the inflector handling the resource method.public ResourceMethod.Builder handlerParameters(Collection<Parameter> parameters)
parameters - handler parameters to be added to the set of handler parameters for the method.public ResourceMethod.Builder handlingMethod(Method handlingMethod)
handledBy() builder methods.handlingMethod - specific handling method.public ResourceMethod.Builder routingResponseType(Type routingResponseType)
Invocable.getRoutingResponseType() will be equal to
 Invocable.getResponseType() which
 is the default configuration state.routingResponseType - Routing response type.Invocable.getRoutingResponseType()public ResourceMethod.Builder extended(boolean extended)
ResourceMethod.isExtended().
 
 Extended resource model components are helper components that are not considered as a core of a
 RESTful API. These can be for example OPTIONS resource methods
 added by model processors
 or application.wadl resource producing the WADL. Both resource are rather supportive
 than the core of RESTful API.
 
extended - If true then resource method is marked as extended.ExtendedResourcepublic ResourceMethod build()
Resource.Builder.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.