Class VirtualServerConfig
- java.lang.Object
-
- org.glassfish.embeddable.web.config.VirtualServerConfig
-
public class VirtualServerConfig extends Object
Class used for configuring VirtualServer instances.- See Also:
VirtualServer
-
-
Constructor Summary
Constructors Constructor Description VirtualServerConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAllowRemoteAddress()Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.StringgetAllowRemoteHost()Gets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.StringgetContextXmlDefault()Gets the location of the default context.xml configuration file.StringgetDefaultWebXml()Gets the location of the default web.xml configuration file.StringgetDenyRemoteAddress()Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.StringgetDenyRemoteHost()Gets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.StringgetHostNames()Gets the host names assigned to any VirtualServer configured via this VirtualServerConfig.booleanisAccessLoggingEnabled()Checks if access logging is enabled or disabled.booleanisAllowLinking()Checks if resources that are symbolic links will be served.booleanisSsoEnabled()Checks if Single-Sign-On is enabled or disabled.voidsetAccessLoggingEnabled(boolean accessLoggingEnabled)Enables or disables access logging.voidsetAllowLinking(boolean allowLinking)Enables or disables the serving of resources that are symbolic links.voidsetAllowRemoteAddress(String allowRemoteAddress)Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.voidsetAllowRemoteHost(String allowRemoteHost)Sets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.voidsetContextXmlDefault(String contextXmlDefault)Sets the location of the default context.xml configuration file.voidsetDefaultWebXml(String defaultWebXml)Sets the location of the default web.xml configuration file.voidsetDenyRemoteAddress(String denyRemoteAddress)Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.voidsetDenyRemoteHost(String denyRemoteHost)Sets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.voidsetHostNames(String hostNames)Sets the host names that will be assigned to any VirtualServer configured via this VirtualServerConfig separated by commas.voidsetSsoEnabled(boolean ssoEnabled)Enables or disables Single-Sign-On.
-
-
-
Method Detail
-
setSsoEnabled
public void setSsoEnabled(boolean ssoEnabled)
Enables or disables Single-Sign-On.- Parameters:
ssoEnabled- true if Single-Sign-On is to be enabled, false otherwise
-
isSsoEnabled
public boolean isSsoEnabled()
Checks if Single-Sign-On is enabled or disabled.- Returns:
- true if Single-Sign-On is enabled, false otherwise
-
setAccessLoggingEnabled
public void setAccessLoggingEnabled(boolean accessLoggingEnabled)
Enables or disables access logging.- Parameters:
accessLoggingEnabled- true if access logging is to be enabled, false otherwise
-
isAccessLoggingEnabled
public boolean isAccessLoggingEnabled()
Checks if access logging is enabled or disabled.- Returns:
- true if access logging is enabled, false otherwise
-
setDefaultWebXml
public void setDefaultWebXml(String defaultWebXml)
Sets the location of the default web.xml configuration file.- Parameters:
defaultWebXml- the location of the default web.xml configuration file
-
getDefaultWebXml
public String getDefaultWebXml()
Gets the location of the default web.xml configuration file.- Returns:
- the location of the default web.xml configuration file, or null if setDefaultWebXml was never called on this VirtualServerConfig
-
setContextXmlDefault
public void setContextXmlDefault(String contextXmlDefault)
Sets the location of the default context.xml configuration file.- Parameters:
contextXmlDefault- the location of the default context.xml configuration file.
-
getContextXmlDefault
public String getContextXmlDefault()
Gets the location of the default context.xml configuration file.- Returns:
- the location of the default context.xml configuration file, or null if setContextXmlDefault was never called on this VirtualServerConfig
-
setAllowLinking
public void setAllowLinking(boolean allowLinking)
Enables or disables the serving of resources that are symbolic links.- Parameters:
allowLinking- true if resources that are symbolic links are to be served, false otherwise
-
isAllowLinking
public boolean isAllowLinking()
Checks if resources that are symbolic links will be served.- Returns:
- true if resources that are symbolic links will be served, false otherwise
-
setAllowRemoteAddress
public void setAllowRemoteAddress(String allowRemoteAddress)
Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.If this property is specified, the remote address must match for this request to be accepted. If this property is not specified, all requests are accepted unless the remote address matches a denyRemoteAddress pattern.
- Parameters:
allowRemoteAddress- the comma-separated list of regular expression patterns that the remote client's IP address is compared to
-
getAllowRemoteAddress
public String getAllowRemoteAddress()
Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.- Returns:
- the comma-separated list of regular expression patterns that the remote client's IP address is compared to, or null if setAllowRemoteAddress was never called on this VirtualServerConfig
-
setDenyRemoteAddress
public void setDenyRemoteAddress(String denyRemoteAddress)
Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.If this property is specified, the remote address must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteAddress property.
- Parameters:
denyRemoteAddress- the comma-separated list of regular expression patterns that the remote client's IP address is compared to
-
getDenyRemoteAddress
public String getDenyRemoteAddress()
Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.- Returns:
- the comma-separated list of regular expression patterns that the remote client's IP address is compared to, or null if setDenyRemoteAddress was never called on this VirtualServerConfig
-
setAllowRemoteHost
public void setAllowRemoteHost(String allowRemoteHost)
Sets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.If this property is specified, the remote hostname must match for this request to be accepted. If this property is not specified, all requests are accepted unless the remote hostname matches a denyRemoteHost pattern.
- Parameters:
allowRemoteHost- the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to
-
getAllowRemoteHost
public String getAllowRemoteHost()
Gets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.- Returns:
- the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to, or null if setAllowRemoteHost was never called on this VirtualServerConfig
-
setDenyRemoteHost
public void setDenyRemoteHost(String denyRemoteHost)
Sets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.If this property is specified, the remote hostname must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteHost property.
- Parameters:
denyRemoteHost- the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to
-
getDenyRemoteHost
public String getDenyRemoteHost()
Gets the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to.- Returns:
- the comma-separated list of regular expression patterns that the remote client's hostname (as returned by java.net.Socket.getInetAddress().getHostName()) is compared to, or null if setDenyRemoteHost was never called on this VirtualServerConfig
-
setHostNames
public void setHostNames(String hostNames)
Sets the host names that will be assigned to any VirtualServer configured via this VirtualServerConfig separated by commas.- Parameters:
hostNames- the host names
-
getHostNames
public String getHostNames()
Gets the host names assigned to any VirtualServer configured via this VirtualServerConfig.- Returns:
- the host names
-
-