com.sun.jersey.server.impl.model.method
Class ResourceMethod
java.lang.Object
com.sun.jersey.server.impl.model.method.ResourceMethod
- Direct Known Subclasses:
- ResourceHeadWrapperMethod, ResourceHttpMethod, ResourceHttpOptionsMethod, ViewResourceMethod
public abstract class ResourceMethod
- extends java.lang.Object
- Author:
- [email protected]
Field Summary |
static java.util.Comparator<ResourceMethod> |
COMPARATOR
Comparator for resource methods, comparing the consumed and produced
media types. |
Constructor Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPARATOR
public static final java.util.Comparator<ResourceMethod> COMPARATOR
- Comparator for resource methods, comparing the consumed and produced
media types.
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.
ResourceMethod
public ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends MediaType> consumeMime,
java.util.List<? extends MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher)
ResourceMethod
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)
getHttpMethod
public final java.lang.String getHttpMethod()
getTemplate
public final UriTemplate getTemplate()
getConsumes
public final java.util.List<? extends MediaType> getConsumes()
getProduces
public final java.util.List<? extends MediaType> getProduces()
isProducesDeclared
public final boolean isProducesDeclared()
getDispatcher
public final RequestDispatcher getDispatcher()
getRequestFilters
public final java.util.List<ContainerRequestFilter> getRequestFilters()
getResponseFilters
public final java.util.List<ContainerResponseFilter> getResponseFilters()
consumes
public final boolean consumes(MediaType contentType)
- Ascertain if the method is capable of consuming an entity of a certain
media type.
- Parameters:
contentType
- the media type of the entity that is to be consumed.
- Returns:
- true if the method is capable of consuming the entity,
otherwise false.
consumesWild
public final boolean consumesWild()
mediaEquals
public final boolean mediaEquals(ResourceMethod that)
getAbstractResourceMethod
public AbstractResourceMethod getAbstractResourceMethod()
- Get the abstract resource method.
Extending classes may override this method to return an associated
abstract resource method.
- Returns:
- the abstract resource method, otherwise null if there is no
abstract resource method assocaiated with the resource method.
Copyright © 2013 Oracle Corporation. All Rights Reserved.