public abstract class ResourceMethod
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<ResourceMethod> |
COMPARATOR
Comparator for resource methods, comparing the consumed and produced
media types.
|
| Constructor and Description |
|---|
ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends MediaType> consumeMime,
java.util.List<? extends MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher) |
ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends MediaType> consumeMime,
java.util.List<? extends MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher,
java.util.List<ContainerRequestFilter> requestFilters,
java.util.List<ContainerResponseFilter> responseFilters) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
consumes(MediaType contentType)
Ascertain if the method is capable of consuming an entity of a certain
media type.
|
boolean |
consumesWild() |
AbstractResourceMethod |
getAbstractResourceMethod()
Get the abstract resource method.
|
java.util.List<? extends MediaType> |
getConsumes() |
RequestDispatcher |
getDispatcher() |
java.lang.String |
getHttpMethod() |
java.util.List<? extends MediaType> |
getProduces() |
java.util.List<ContainerRequestFilter> |
getRequestFilters() |
java.util.List<ContainerResponseFilter> |
getResponseFilters() |
UriTemplate |
getTemplate() |
boolean |
isProducesDeclared() |
boolean |
mediaEquals(ResourceMethod that) |
public static final java.util.Comparator<ResourceMethod> COMPARATOR
Defer to MediaTypes.MEDIA_TYPE_LIST_COMPARATOR for comparing
the list of media type that are comsumed and produced. The comparison of
consumed media take precedence over the comparison of produced
media.
public ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends MediaType> consumeMime,
java.util.List<? extends MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher)
public ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends MediaType> consumeMime,
java.util.List<? extends MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher,
java.util.List<ContainerRequestFilter> requestFilters,
java.util.List<ContainerResponseFilter> responseFilters)
public final java.lang.String getHttpMethod()
public final UriTemplate getTemplate()
public final java.util.List<? extends MediaType> getConsumes()
public final java.util.List<? extends MediaType> getProduces()
public final boolean isProducesDeclared()
public final RequestDispatcher getDispatcher()
public final java.util.List<ContainerRequestFilter> getRequestFilters()
public final java.util.List<ContainerResponseFilter> getResponseFilters()
public final boolean consumes(MediaType contentType)
contentType - the media type of the entity that is to be consumed.public final boolean consumesWild()
public final boolean mediaEquals(ResourceMethod that)
public AbstractResourceMethod getAbstractResourceMethod()
Extending classes may override this method to return an associated abstract resource method.
Copyright © 2015 Oracle Corporation. All Rights Reserved.