Class AbstractResource

    • Field Detail

      • INTERNAL_HEADERS

        public static final Set<String> INTERNAL_HEADERS
        header values that are managed internally and must not be set directly
      • CONTENT_RANGE_STARTBYTE

        public static final MetaDataKey<Long> CONTENT_RANGE_STARTBYTE
        The meta data key of the content range start byte
      • CONTENT_RANGE_ENDBYTE

        public static final MetaDataKey<Long> CONTENT_RANGE_ENDBYTE
        The meta data key of the content range end byte
    • Constructor Detail

      • AbstractResource

        public AbstractResource()
        Construct.
    • Method Detail

      • setRequestMetaData

        protected void setRequestMetaData​(IResource.Attributes attributes)
        Reads the plain request header information and applies enriched information as meta data to the current request. Those information are available for the whole request cycle.
        Parameters:
        attributes - the attributes to get the plain request header information
      • setRequestRangeMetaData

        protected void setRequestRangeMetaData​(org.apache.wicket.request.http.WebRequest webRequest)
      • setResponseHeaders

        protected void setResponseHeaders​(AbstractResource.ResourceResponse resourceResponse,
                                          IResource.Attributes attributes)
        Sets the response header of resource response to the response received from the attributes
        Parameters:
        resourceResponse - the resource response to get the header fields from
        attributes - the attributes to get the response from to which the header information are going to be applied
      • setResponseContentRangeHeaderFields

        protected boolean setResponseContentRangeHeaderFields​(org.apache.wicket.request.http.WebResponse webResponse,
                                                              IResource.Attributes attributes,
                                                              long contentLength)
        Sets the content range header fields to the given web response
        Parameters:
        webResponse - the web response to apply the content range information to
        attributes - the attributes to get the request from
        contentLength - the content length of the response
        Returns:
        if the content range header information has been applied