Class AlternateDocBase


  • public class AlternateDocBase
    extends Object
    • Constructor Detail

      • AlternateDocBase

        public AlternateDocBase()
    • Method Detail

      • setUrlPattern

        public void setUrlPattern​(String urlPattern)
        Sets the url pattern of this AlternateDocBase.
        Parameters:
        urlPattern - The url pattern of this AlternateDocBase
      • getUrlPattern

        public String getUrlPattern()
        Gets the url pattern of this AlternateDocBase.
        Returns:
        The url pattern of this AlternativeDocBase
      • getUrlPatternType

        public org.glassfish.grizzly.http.server.util.AlternateDocBase.UrlPatternType getUrlPatternType()
        Gets the url pattern type (exact, wildcard, extension) of this AlternateDocBase.
        Returns:
        The url pattern type (exact, wildcard, extension) of this AlternativeDocBase
      • getUrlPatternSlashCount

        public int getUrlPatternSlashCount()
        Gets the number of slashes in the url pattern of this AlternateDocBase.
        Returns:
        Number of slashes in the url pattern of this AlternateDocBase.
      • getUrlPatternSuffix

        public String getUrlPatternSuffix()
        Gets the extension suffix of the url pattern of this AlternateDocBase.
        Returns:
        The extension suffix of the url pattern of this AlternateDocBase, or null if the url pattern is not of type 'extension'
      • getUrlPatternWildcardPath

        public String getUrlPatternWildcardPath()
        Gets the wildcard path of this AlternateDocBase (this is the path specified by the wildcard pattern, minus the trailing '*').
        Returns:
        The wildcard path of this AlternateDocBase, or null if the pattern associated with this AlternateDocBase is not a wildcard pattern
      • setDocBase

        public void setDocBase​(String docBase)
        Sets the (possibly relative) doc base path of this AlternateDocBase.
        Parameters:
        docBase - The (possibly relative) doc base path of this AlternateDocBase
      • getDocBase

        public String getDocBase()
        Gets the (possibly relative) doc base path of this AlternateDocBase.
        Returns:
        The (possibly relative) doc base path of this AlternativeDocBase
      • setBasePath

        public void setBasePath​(String basePath)
        Sets the absolute doc base path of this AlternateDocBase.
        Parameters:
        basePath - The absolute doc base path of this AlternateDocBase
      • getBasePath

        public String getBasePath()
        Gets the absolute doc base path of this AlternateDocBase.
        Returns:
        The absolute doc base path of this AlternativeDocBase
      • setResources

        public void setResources​(DirContext resources)
        Sets the proxied resources of this AlternateDocBase.
        Parameters:
        resources - The proxied resources of this AlternateDocBase
      • getResources

        public DirContext getResources()
        Gets the proxied resources of this AlternateDocBase.
        Returns:
        The proxied resources of this AlternateDocBase
      • setWebappResources

        public void setWebappResources​(DirContext webappResources)
        Sets the non-proxied resources of this AlternateDocBase.
        Parameters:
        webappResources - The non-proxied resources of this AlternateDocBase
      • getWebappResources

        public DirContext getWebappResources()
        Gets the non-proxied resources of this AlternateDocBase.
        Returns:
        The non-proxied resources of this AlternateDocBase
      • findMatch

        public static AlternateDocBase findMatch​(String path,
                                                 List<AlternateDocBase> alternateDocBases)
        Attempts to match the given request path against one of the given alternate doc bases.
        Returns:
        The alternate doc base whose url pattern matches the given path, or null if no matching alternate doc base could be found