Class RangeAwareServletContextHelper


  • public abstract class RangeAwareServletContextHelper
    extends org.osgi.service.http.context.ServletContextHelper
    A custom servlet context helper type providing support for predicting the need for ranged content responses based on the content type and the user agent.
    Since:
    1.5
    • Field Summary

      • Fields inherited from class org.osgi.service.http.context.ServletContextHelper

        AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean rangeableContentType​(java.lang.String contentType, java.lang.String userAgent)
      Return true if the content type should result in a ranged content response based on the user agent.
      • Methods inherited from class org.osgi.service.http.context.ServletContextHelper

        finishSecurity, getMimeType, getRealPath, getResource, getResourcePaths, handleSecurity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RangeAwareServletContextHelper

        public RangeAwareServletContextHelper()
      • RangeAwareServletContextHelper

        public RangeAwareServletContextHelper​(org.osgi.framework.Bundle bundle)
    • Method Detail

      • rangeableContentType

        public boolean rangeableContentType​(java.lang.String contentType,
                                            java.lang.String userAgent)
        Return true if the content type should result in a ranged content response based on the user agent. The user agent value is obtained from the User-Agent request header.

        This mechanism is only applicable if the browser didn't make a range request for a known ranged content type.

        Parameters:
        contentType - the content type of the request
        userAgent - the value obtained from the "User-Agent" header