Class ResourceMethod

    • Field Detail

      • annotatedMethod

        private final java.lang.reflect.Method annotatedMethod
        Deprecated.
        the Java method that should be referenced for annotations. This method could be different from the method is called for executing, see section 3.6 "Annotation Inheritance" of JSR-311-spec.
        See Also:
        AbstractMethodWrapper.executeMethod
      • consumedMimes

        private final java.util.List<MediaType> consumedMimes
        Deprecated.
        See Also:
        Consumes
      • httpMethod

        private final Method httpMethod
        Deprecated.
      • producedMimes

        private final java.util.List<MediaType> producedMimes
        Deprecated.
        See Also:
        Produces
      • supportedVariants

        private final java.util.Collection<javax.ws.rs.core.Variant> supportedVariants
        Deprecated.
        Contains the list of supported Variants (lazy initialized by getSupportedVariants().
    • Method Detail

      • createSupportedVariants

        private java.util.Collection<javax.ws.rs.core.Variant> createSupportedVariants()
        Deprecated.
        Creates the list of the supported variants from the getProducedMimes()to be stored in the final instance variable supportedVariants.
      • getAnnotations

        public java.lang.annotation.Annotation[] getAnnotations()
        Deprecated.
        Returns the array of the annotations on the Java method
        Returns:
        the array of the annotations on the Java method
        See Also:
        AccessibleObject.getAnnotations()
      • getConsumedMimes

        public java.util.List<MediaType> getConsumedMimes()
        Deprecated.
        Returns:
        Returns an unmodifiable List with the MediaTypes the given resourceMethod consumes. If no consumeMime is given, this method returns a List with MediaType.ALL. Will never return null.
      • getGenericReturnType

        public java.lang.reflect.Type getGenericReturnType()
        Deprecated.
        Returns the generic return type of the wrapped method.
        Returns:
        the generic return type of the wrapped method.
        See Also:
        Method.getGenericReturnType()
      • getHttpMethod

        public Method getHttpMethod()
        Deprecated.
        Returns:
        Returns the HTTP method supported by the wrapped java method.
      • getProducedMimes

        public java.util.List<MediaType> getProducedMimes()
        Deprecated.
        Returns:
        Returns an unmodifiable List of MediaTypes the given Resource Method. if the method is not annotated with Produces, than the Produces of the Resource class is returned. If no Produces can be found, an empty (also unmodifiable) List will returned.
        This method never returns null.
      • getSupportedVariants

        public java.util.Collection<javax.ws.rs.core.Variant> getSupportedVariants()
        Deprecated.
        Returns the Variants supported by this resource method.
        Returns:
        the Variants supported by this resource method.
      • isAcceptedMediaTypeSupported

        public boolean isAcceptedMediaTypeSupported​(SortedMetadata<MediaType> accMediaTypess)
        Deprecated.
        Check if this method supports the media type to produce for a request.
        Parameters:
        accMediaTypess - The Media Types the client would accept, ordered by quality. See SortedMetadata
        Returns:
        Returns true, if the give MediaType is supported by the method, or no MediaType is given for the method, otherweise false.
      • isGivenMediaTypeSupported

        public boolean isGivenMediaTypeSupported​(MediaType givenMediaType)
        Deprecated.
        Parameters:
        resourceMethod - the resource method to check
        givenMediaType - the MediaType of the request entity
        Returns:
        Returns true, if the given MediaType is supported by the method, or no MediaType is given for the method, otherweise false;
      • isHttpMethodSupported

        public boolean isHttpMethodSupported​(Method requestedMethod)
        Deprecated.
        Parameters:
        resourceMethod -
        requestedMethod -
        Returns:
        true, if the gien java method is annotated with a runtime designator for the given requested Method. If the requested method is null, than the method returns true, when the method is annotated with any runtime desginator.
        See Also:
        #annotatedWithMethodDesignator(Method)
      • isHttpMethodSupported

        public boolean isHttpMethodSupported​(Method requestedMethod,
                                             boolean alsoGet)
                                      throws java.lang.IllegalArgumentException
        Deprecated.
        Checks, if this method suppors the given HTTP method.
        Parameters:
        requestedMethod - the requested Method
        alsoGet - if true, than this method returns also true, if this method is GET. This functionality is needed for HEAD.
        Returns:
        true, if this method supports the given HTTP method. Returns also true, if alsoGet is true and this method is true.
        Throws:
        java.lang.IllegalArgumentException