Class AlternateDocBase
- java.lang.Object
-
- org.glassfish.grizzly.http.server.util.AlternateDocBase
-
public class AlternateDocBase extends Object
-
-
Constructor Summary
Constructors Constructor Description AlternateDocBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AlternateDocBasefindMatch(String path, List<AlternateDocBase> alternateDocBases)Attempts to match the given request path against one of the given alternate doc bases.StringgetBasePath()Gets the absolute doc base path of this AlternateDocBase.StringgetDocBase()Gets the (possibly relative) doc base path of this AlternateDocBase.DirContextgetResources()Gets the proxied resources of this AlternateDocBase.StringgetUrlPattern()Gets the url pattern of this AlternateDocBase.intgetUrlPatternSlashCount()Gets the number of slashes in the url pattern of this AlternateDocBase.StringgetUrlPatternSuffix()Gets the extension suffix of the url pattern of this AlternateDocBase.org.glassfish.grizzly.http.server.util.AlternateDocBase.UrlPatternTypegetUrlPatternType()Gets the url pattern type (exact, wildcard, extension) of this AlternateDocBase.StringgetUrlPatternWildcardPath()Gets the wildcard path of this AlternateDocBase (this is the path specified by the wildcard pattern, minus the trailing '*').DirContextgetWebappResources()Gets the non-proxied resources of this AlternateDocBase.voidsetBasePath(String basePath)Sets the absolute doc base path of this AlternateDocBase.voidsetDocBase(String docBase)Sets the (possibly relative) doc base path of this AlternateDocBase.voidsetResources(DirContext resources)Sets the proxied resources of this AlternateDocBase.voidsetUrlPattern(String urlPattern)Sets the url pattern of this AlternateDocBase.voidsetWebappResources(DirContext webappResources)Sets the non-proxied resources of this 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
-
-