Class AlternateDocBase


  • public class AlternateDocBase
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AlternateDocBase findMatch​(java.lang.String path, java.util.List<AlternateDocBase> alternateDocBases)
      Attempts to match the given request path against one of the given alternate doc bases.
      java.lang.String getBasePath()
      Gets the absolute doc base path of this AlternateDocBase.
      java.lang.String getDocBase()
      Gets the (possibly relative) doc base path of this AlternateDocBase.
      DirContext getResources()
      Gets the proxied resources of this AlternateDocBase.
      java.lang.String getUrlPattern()
      Gets the url pattern of this AlternateDocBase.
      int getUrlPatternSlashCount()
      Gets the number of slashes in the url pattern of this AlternateDocBase.
      java.lang.String getUrlPatternSuffix()
      Gets the extension suffix of the url pattern of this AlternateDocBase.
      org.glassfish.grizzly.http.server.util.AlternateDocBase.UrlPatternType getUrlPatternType()
      Gets the url pattern type (exact, wildcard, extension) of this AlternateDocBase.
      java.lang.String getUrlPatternWildcardPath()
      Gets the wildcard path of this AlternateDocBase (this is the path specified by the wildcard pattern, minus the trailing '*').
      DirContext getWebappResources()
      Gets the non-proxied resources of this AlternateDocBase.
      void setBasePath​(java.lang.String basePath)
      Sets the absolute doc base path of this AlternateDocBase.
      void setDocBase​(java.lang.String docBase)
      Sets the (possibly relative) doc base path of this AlternateDocBase.
      void setResources​(DirContext resources)
      Sets the proxied resources of this AlternateDocBase.
      void setUrlPattern​(java.lang.String urlPattern)
      Sets the url pattern of this AlternateDocBase.
      void setWebappResources​(DirContext webappResources)
      Sets the non-proxied resources of this AlternateDocBase.
      • Methods inherited from class java.lang.Object

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

      • AlternateDocBase

        public AlternateDocBase()
    • Method Detail

      • setUrlPattern

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

        public java.lang.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 java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.String basePath)
        Sets the absolute doc base path of this AlternateDocBase.
        Parameters:
        basePath - The absolute doc base path of this AlternateDocBase
      • getBasePath

        public java.lang.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​(java.lang.String path,
                                                 java.util.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