Top Inners Fields Constructors Methods
org.glassfish.grizzly.http.server.util

public Class AlternateDocBase

extends Object
Class Inheritance
Imports
java.util.List, org.glassfish.grizzly.http.server.naming.DirContext

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private int
private String
private AlternateDocBase.UrlPatternType
private DirContext
private DirContext
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static AlternateDocBase

Returns:

The alternate doc base whose url pattern matches the given path, or null if no matching alternate doc base could be found
findMatch
(String path, List<AlternateDocBase> alternateDocBases)

Attempts to match the given request path against one of the given alternate doc bases.

public String

Returns:

The absolute doc base path of this AlternativeDocBase
getBasePath
()

Gets the absolute doc base path of this AlternateDocBase.

public String

Returns:

The (possibly relative) doc base path of this AlternativeDocBase
getDocBase
()

Gets the (possibly relative) doc base path of this AlternateDocBase.

public DirContext

Returns:

The proxied resources of this AlternateDocBase
getResources
()

Gets the proxied resources of this AlternateDocBase.

private static int

Returns:

The number of forward slashes
getSlashCount
(String
The string whose forward slashes to count
s
)

Determines the number for forward slashes in the given string.

public String

Returns:

The url pattern of this AlternativeDocBase
getUrlPattern
()

Gets the url pattern of this AlternateDocBase.

public int

Returns:

Number of slashes in the url pattern of this AlternateDocBase.
getUrlPatternSlashCount
()

Gets the number of slashes in the url pattern of this AlternateDocBase.

public String

Returns:

The extension suffix of the url pattern of this AlternateDocBase, or null if the url pattern is not of type 'extension'
getUrlPatternSuffix
()

Gets the extension suffix of the url pattern of this AlternateDocBase.

public AlternateDocBase.UrlPatternType

Returns:

The url pattern type (exact, wildcard, extension) of this AlternativeDocBase
getUrlPatternType
()

Gets the url pattern type (exact, wildcard, extension) of this AlternateDocBase.

public String

Returns:

The wildcard path of this AlternateDocBase, or null if the pattern associated with this AlternateDocBase is not a wildcard pattern
getUrlPatternWildcardPath
()

Gets the wildcard path of this AlternateDocBase (this is the path specified by the wildcard pattern, minus the trailing '*').

public DirContext

Returns:

The non-proxied resources of this AlternateDocBase
getWebappResources
()

Gets the non-proxied resources of this AlternateDocBase.

public void
setBasePath(String
The absolute doc base path of this AlternateDocBase
basePath
)

Sets the absolute doc base path of this AlternateDocBase.

public void
setDocBase(String
The (possibly relative) doc base path of this AlternateDocBase
docBase
)

Sets the (possibly relative) doc base path of this AlternateDocBase.

public void
setResources(DirContext
The proxied resources of this AlternateDocBase
resources
)

Sets the proxied resources of this AlternateDocBase.

public void
setUrlPattern(String
The url pattern of this AlternateDocBase
urlPattern
)

Sets the url pattern of this AlternateDocBase.

public void
setWebappResources(DirContext
The non-proxied resources of this AlternateDocBase
webappResources
)

Sets the non-proxied resources of this AlternateDocBase.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

basePathback to summary
private String basePath
docBaseback to summary
private String docBase
patternback to summary
private String pattern
patternSlashCountback to summary
private int patternSlashCount
patternSuffixback to summary
private String patternSuffix
patternTypeback to summary
private AlternateDocBase.UrlPatternType patternType
resourcesback to summary
private DirContext resources
webappResourcesback to summary
private DirContext webappResources
wildcardPathback to summary
private String wildcardPath

Constructor Detail

AlternateDocBaseback to summary
public AlternateDocBase()

Method Detail

findMatchback to summary
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:AlternateDocBase

The alternate doc base whose url pattern matches the given path, or null if no matching alternate doc base could be found

getBasePathback to summary
public String getBasePath()

Gets the absolute doc base path of this AlternateDocBase.

Returns:String

The absolute doc base path of this AlternativeDocBase

getDocBaseback to summary
public String getDocBase()

Gets the (possibly relative) doc base path of this AlternateDocBase.

Returns:String

The (possibly relative) doc base path of this AlternativeDocBase

getResourcesback to summary
public DirContext getResources()

Gets the proxied resources of this AlternateDocBase.

Returns:DirContext

The proxied resources of this AlternateDocBase

getSlashCountback to summary
private static int getSlashCount(String s)

Determines the number for forward slashes in the given string.

Parameters
s:String

The string whose forward slashes to count

Returns:int

The number of forward slashes

getUrlPatternback to summary
public String getUrlPattern()

Gets the url pattern of this AlternateDocBase.

Returns:String

The url pattern of this AlternativeDocBase

getUrlPatternSlashCountback to summary
public int getUrlPatternSlashCount()

Gets the number of slashes in the url pattern of this AlternateDocBase.

Returns:int

Number of slashes in the url pattern of this AlternateDocBase.

getUrlPatternSuffixback to summary
public String getUrlPatternSuffix()

Gets the extension suffix of the url pattern of this AlternateDocBase.

Returns:String

The extension suffix of the url pattern of this AlternateDocBase, or null if the url pattern is not of type 'extension'

getUrlPatternTypeback to summary
public AlternateDocBase.UrlPatternType getUrlPatternType()

Gets the url pattern type (exact, wildcard, extension) of this AlternateDocBase.

Returns:AlternateDocBase.UrlPatternType

The url pattern type (exact, wildcard, extension) of this AlternativeDocBase

getUrlPatternWildcardPathback to summary
public String getUrlPatternWildcardPath()

Gets the wildcard path of this AlternateDocBase (this is the path specified by the wildcard pattern, minus the trailing '*').

Returns:String

The wildcard path of this AlternateDocBase, or null if the pattern associated with this AlternateDocBase is not a wildcard pattern

getWebappResourcesback to summary
public DirContext getWebappResources()

Gets the non-proxied resources of this AlternateDocBase.

Returns:DirContext

The non-proxied resources of this AlternateDocBase

setBasePathback to summary
public void setBasePath(String basePath)

Sets the absolute doc base path of this AlternateDocBase.

Parameters
basePath:String

The absolute doc base path of this AlternateDocBase

setDocBaseback to summary
public void setDocBase(String docBase)

Sets the (possibly relative) doc base path of this AlternateDocBase.

Parameters
docBase:String

The (possibly relative) doc base path of this AlternateDocBase

setResourcesback to summary
public void setResources(DirContext resources)

Sets the proxied resources of this AlternateDocBase.

Parameters
resources:DirContext

The proxied resources of this AlternateDocBase

setUrlPatternback to summary
public void setUrlPattern(String urlPattern)

Sets the url pattern of this AlternateDocBase.

Parameters
urlPattern:String

The url pattern of this AlternateDocBase

setWebappResourcesback to summary
public void setWebappResources(DirContext webappResources)

Sets the non-proxied resources of this AlternateDocBase.

Parameters
webappResources:DirContext

The non-proxied resources of this AlternateDocBase

org.glassfish.grizzly.http.server.util back to summary

pack-priv final Enum AlternateDocBase.UrlPatternType

extends Enum<AlternateDocBase.UrlPatternType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AlternateDocBase.UrlPatternType
public static final AlternateDocBase.UrlPatternType
public static final AlternateDocBase.UrlPatternType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AlternateDocBase.UrlPatternType
public static AlternateDocBase.UrlPatternType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXACTback to summary
public static final AlternateDocBase.UrlPatternType EXACT
EXTENSIONback to summary
public static final AlternateDocBase.UrlPatternType EXTENSION
WILDCARDback to summary
public static final AlternateDocBase.UrlPatternType WILDCARD

Constructor Detail

UrlPatternTypeback to summary
private UrlPatternType()

Method Detail

valueOfback to summary
public static AlternateDocBase.UrlPatternType valueOf(String name)
valuesback to summary
public static AlternateDocBase.UrlPatternType[] values()