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 String
getAllowRemoteAddress()
Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.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.String
getContextXmlDefault()
Gets the location of the default context.xml configuration file.String
getDefaultWebXml()
Gets the location of the default web.xml configuration file.String
getDenyRemoteAddress()
Gets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.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.String
getHostNames()
Gets the host names assigned to any VirtualServer configured via this VirtualServerConfig.boolean
isAccessLoggingEnabled()
Checks if access logging is enabled or disabled.boolean
isAllowLinking()
Checks if resources that are symbolic links will be served.boolean
isSsoEnabled()
Checks if Single-Sign-On is enabled or disabled.void
setAccessLoggingEnabled(boolean accessLoggingEnabled)
Enables or disables access logging.void
setAllowLinking(boolean allowLinking)
Enables or disables the serving of resources that are symbolic links.void
setAllowRemoteAddress(String allowRemoteAddress)
Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.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.void
setContextXmlDefault(String contextXmlDefault)
Sets the location of the default context.xml configuration file.void
setDefaultWebXml(String defaultWebXml)
Sets the location of the default web.xml configuration file.void
setDenyRemoteAddress(String denyRemoteAddress)
Sets the comma-separated list of regular expression patterns that the remote client's IP address is compared to.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.void
setHostNames(String hostNames)
Sets the host names that will be assigned to any VirtualServer configured via this VirtualServerConfig separated by commas.void
setSsoEnabled(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
-
-