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:
- Paul.Sandoz@Sun.Com
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 javax.ws.rs.core.MediaType> consumeMime,
java.util.List<? extends javax.ws.rs.core.MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher)
|
ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends javax.ws.rs.core.MediaType> consumeMime,
java.util.List<? extends javax.ws.rs.core.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 javax.ws.rs.core.MediaType> consumeMime,
java.util.List<? extends javax.ws.rs.core.MediaType> produceMime,
boolean isProducesDeclared,
RequestDispatcher dispatcher)
ResourceMethod
public ResourceMethod(java.lang.String httpMethod,
UriTemplate template,
java.util.List<? extends javax.ws.rs.core.MediaType> consumeMime,
java.util.List<? extends javax.ws.rs.core.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 javax.ws.rs.core.MediaType> getConsumes()
getProduces
public final java.util.List<? extends javax.ws.rs.core.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(javax.ws.rs.core.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)
Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.