Interface VirtualServer
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy,org.jvnet.hk2.config.types.PropertyBag
Virtualization in Application Server allows multiple URL domains to be served by the same HTTP server process, which is listening on multiple host addresses. If an application is available at two virtual servers, they still share same physical resource pools, such as JDBC connection pools. GlassFish allows a list of virtual servers, to be specified along with web-module and Jakarta EE application elements. This establishes an association between URL domains, represented by the virtual server and the web modules (standalone web modules or web modules inside the ear file).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddNetworkListener(String name) default org.glassfish.grizzly.config.dom.NetworkListenerfindNetworkListener(String name) default List<org.glassfish.grizzly.config.dom.NetworkListener> Gets the value of theaccessLogproperty.@Pattern(regexp="(true|on|false|off|inherit)",message="Valid values: (true|on|false|off|inherit)") StringGets the value of the access logging enabled property.Gets the value of thedefaultWebModuleproperty.Gets the value of thedocrootproperty.@NotNull StringgetHosts()Gets the value of thehostsproperty.Gets the value of thehttpAccessLogproperty.Deprecated.@NotNull StringgetId()Gets the value of theidproperty.Gets the value of thelogFileproperty.Gets the value of thenetworkListenersproperty.List<org.jvnet.hk2.config.types.Property> Properties.@Pattern(regexp="(true|false|dynamic)",message="Valid values: (true|false|dynamic)") StringGets the Secure attribute of anyJSESSIONIDSSOcookies associated with the web applications deployed to this virtual server.@Pattern(regexp="(true|on|false|off|inherit)",message="Valid values: (true|on|false|off|inherit)") StringGets the value of thessoEnabledproperty.@Pattern(regexp="(on|off|disabled)",message="Valid values: (on|off|disabled)") StringgetState()Gets the value of thestateproperty.default voidremoveNetworkListener(String name) voidsetAccessLog(String accessLog) Sets the value of theaccessLogproperty.voidsetAccessLoggingEnabled(String accessLoggingEnabled) Sets the value of the access logging enabled property.voidsetDefaultWebModule(String defaultWebModule) Sets the value of thedefaultWebModuleproperty.voidsetDocroot(String docroot) Sets the value of thedocrootproperty.voidSets the value of thehostsproperty.voidsetHttpAccessLog(HttpAccessLog httpAccessLog) Sets the value of thehttpAccessLogproperty.voidsetHttpListeners(String httpListeners) Deprecated.voidSets the value of theidproperty.voidsetLogFile(String logFile) Sets the value of thelogFileproperty.voidsetNetworkListeners(String networkListeners) Sets the value of thenetworkListenersproperty.voidsetSsoCookieHttpOnly(String httpOnly) voidsetSsoCookieSecure(String ssoCookieSecure) voidsetSsoEnabled(String ssoEnabled) Sets the value of thessoEnabledproperty.voidSets the value of thestateproperty.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParentMethods inherited from interface org.jvnet.hk2.config.types.PropertyBag
addProperty, getProperty, getPropertyValue, getPropertyValue, lookupProperty, removeProperty, removeProperty
-
Field Details
-
VALUES_ACCESS_LOG_ENABLED
- See Also:
-
VALUES_SSO_ENABLED
- See Also:
-
VALUES_SSO_COOKIE_ENABLED
- See Also:
-
VALUES_STATE
- See Also:
-
-
Method Details
-
getId
Gets the value of theidproperty.Virtual server ID. This is a unique ID that allows lookup of a specific virtual server. A virtual server ID cannot begin with a number.
- Returns:
- possible object is
String
-
setId
Sets the value of theidproperty.- Parameters:
id- allowed object isString- Throws:
PropertyVetoException
-
getHttpListeners
Deprecated.Gets the value of thehttpListenersproperty.>Comma-separated list of http-listener id(s).
Required only for a Virtual Server that is not the default virtual server.
- Returns:
- possible object is
String
-
setHttpListeners
Deprecated.Sets the value of thehttpListenersproperty.- Parameters:
httpListeners- allowed object isString- Throws:
PropertyVetoException
-
getNetworkListeners
String getNetworkListeners()Gets the value of thenetworkListenersproperty.- Returns:
- possible object is
String
-
setNetworkListeners
Sets the value of thenetworkListenersproperty.- Parameters:
networkListeners- object isString- Throws:
PropertyVetoException
-
getDefaultWebModule
String getDefaultWebModule()Gets the value of thedefaultWebModuleproperty.Standalone web module associated with this virtual server by default.
- Returns:
- possible object is
String
-
setDefaultWebModule
Sets the value of thedefaultWebModuleproperty.- Parameters:
defaultWebModule- allowed object isString- Throws:
PropertyVetoException
-
getHosts
Gets the value of thehostsproperty.A comma-separated list of values allowed in the
Hostrequest header to select current virtual server. Each Virtual Server that is configured to the same Connection Group must have a unique hosts value for that group.- Returns:
- possible object is
String
-
setHosts
Sets the value of thehostsproperty.- Parameters:
hosts- allowed object isString- Throws:
PropertyVetoException
-
getState
@Pattern(regexp="(on|off|disabled)", message="Valid values: (on|off|disabled)") @Pattern(regexp="(on|off|disabled)",message="Valid values: (on|off|disabled)") String getState()Gets the value of thestateproperty.Determines whether Virtual Server is active(
on) or inactive(off,disable). The default ison(active).When inactive, a Virtual Server does not service requests.
Offreturns a 404: Status code (404) indicating that the requested resource is not available,disabledreturns a 403: Status code (403) indicating the server understood the request but refused to fulfill it.- Returns:
- possible object is
String
-
setState
Sets the value of thestateproperty.- Parameters:
state- allowed object isString- Throws:
PropertyVetoException
-
getDocroot
String getDocroot()Gets the value of thedocrootproperty.The location on the filesystem where the files related to the content to be served by this virtual server is stored.
- Returns:
- possible object is
String
-
setDocroot
Sets the value of thedocrootproperty.- Parameters:
docroot- allowed object isString- Throws:
PropertyVetoException
-
getAccessLog
String getAccessLog()Gets the value of theaccessLogproperty.- Returns:
- possible object is
String
-
setAccessLog
Sets the value of theaccessLogproperty.- Parameters:
accessLog- allowed object isString- Throws:
PropertyVetoException
-
getSsoEnabled
@Pattern(regexp="(true|on|false|off|inherit)", message="Valid values: (true|on|false|off|inherit)") @Pattern(regexp="(true|on|false|off|inherit)",message="Valid values: (true|on|false|off|inherit)") String getSsoEnabled()Gets the value of thessoEnabledproperty.Possible values:
true/false/inherit.- Returns:
- possible object is
String
-
setSsoEnabled
Sets the value of thessoEnabledproperty.- Parameters:
ssoEnabled- allowed object isString- Throws:
PropertyVetoException
-
getAccessLoggingEnabled
@Pattern(regexp="(true|on|false|off|inherit)", message="Valid values: (true|on|false|off|inherit)") @Pattern(regexp="(true|on|false|off|inherit)",message="Valid values: (true|on|false|off|inherit)") String getAccessLoggingEnabled()Gets the value of the access logging enabled property.Possible values:
true/false/inherit.- Returns:
- possible object is
String
-
setAccessLoggingEnabled
Sets the value of the access logging enabled property.- Parameters:
accessLoggingEnabled- allowed object isString- Throws:
PropertyVetoException
-
getLogFile
String getLogFile()Gets the value of thelogFileproperty.Specifies a log file for virtual-server-specific log messages. Default value is
${com.sun.aas.instanceRoot}/logs/server.log.- Returns:
- possible object is
String
-
setLogFile
Sets the value of thelogFileproperty.- Parameters:
logFile- allowed object isString- Throws:
PropertyVetoException
-
getHttpAccessLog
HttpAccessLog getHttpAccessLog()Gets the value of thehttpAccessLogproperty.- Returns:
- possible object is
HttpAccessLog
-
setHttpAccessLog
Sets the value of thehttpAccessLogproperty.- Parameters:
httpAccessLog- allowed object isHttpAccessLog- Throws:
PropertyVetoException
-
getSsoCookieSecure
@Pattern(regexp="(true|false|dynamic)", message="Valid values: (true|false|dynamic)") @Pattern(regexp="(true|false|dynamic)",message="Valid values: (true|false|dynamic)") String getSsoCookieSecure()Gets the Secure attribute of anyJSESSIONIDSSOcookies associated with the web applications deployed to this virtual server. Applicable only if thessoEnabledproperty is set to true. To set the Secure attribute of aJSESSIONIDcookie, use thecookieSecurecookie-properties property in thesun-web.xmlfile. Valid values:true,false,dynamic. -
setSsoCookieSecure
-
getSsoCookieHttpOnly
String getSsoCookieHttpOnly() -
setSsoCookieHttpOnly
-
addNetworkListener
- Throws:
PropertyVetoException
-
removeNetworkListener
- Throws:
PropertyVetoException
-
findNetworkListener
-
findNetworkListeners
-
getProperty
@PropertyDesc(name="sso-max-inactive-seconds",defaultValue="300",dataType=PositiveInteger.class,description="The time after which a user\'s single sign-on record becomes eligible for purging if no client activity is received. Since single sign-on applies across several applications on the same virtual server, access to any of the applications keeps the single sign-on record active. Higher values provide longer single sign-on persistence for the users at the expense of more memory use on the server") @PropertyDesc(name="sso-reap-interval-seconds",defaultValue="60",dataType=PositiveInteger.class,description="Interval between purges of expired single sign-on records") @PropertyDesc(name="setCacheControl",description="Comma-separated list of Cache-Control response directives. For a list of valid directives, see section 14.9 of the document at http://www.ietf.org/rfc/rfc2616.txt") @PropertyDesc(name="accessLoggingEnabled",defaultValue="false",dataType=java.lang.Boolean.class,description="Enables access logging for this virtual server only") @PropertyDesc(name="accessLogBufferSize",defaultValue="32768",dataType=PositiveInteger.class,description="Size in bytes of the buffer where access log calls are stored. If the value is less than 5120, a warning message is issued, and the value is set to 5120. To set this property for all virtual servers, set it as a property of the parent http-service") @PropertyDesc(name="accessLogWriteInterval",defaultValue="300",dataType=PositiveInteger.class,description="Number of seconds before the log is written to the disk. The access log is written when the buffer is full or when the interval expires. If the value is 0, the buffer is always written even if it is not full. This means that each time the server is accessed, the log message is stored directly to the file. To set this property for all virtual servers, set it as a property of the parent http-service") @PropertyDesc(name="allowRemoteAddress",description="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") @PropertyDesc(name="denyRemoteAddress",description="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") @PropertyDesc(name="allowRemoteHost",description="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 the request to be accepted. If this property is not specified, all requests are accepted unless the remote hostname matches a \'denyRemoteHost\' pattern") @PropertyDesc(name="denyRemoteHost",description="Specifies a 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") @PropertyDesc(name="authRealm",description="Specifies the name attribute of an \u201cauth-realm\u201c on page 23 element, which overrides the server instance\'s default realm for stand-alone web applications deployed to this virtual server. A realm defined in a stand-alone web application\'s web.xml file overrides the virtual server\'s realm") @PropertyDesc(name="securePagesWithPragma",defaultValue="true",dataType=java.lang.Boolean.class,description="Set this property to false to ensure that for all web applications on this virtual server file downloads using SSL work properly in Internet Explorer. You can set this property for a specific web application.") @PropertyDesc(name="contextXmlDefault",description="The location, relative to domain-dir, of the context.xml file for this virtual server, if one is used") @PropertyDesc(name="allowLinking",defaultValue="false",dataType=java.lang.Boolean.class,description="If true, resources that are symbolic links in web applications on this virtual server are served. The value of this property in the sun-web.xml file takes precedence if defined. Caution: setting this property to true on Windows systems exposes JSP source code.") @PropertyDesc(name="alternatedocroot_*",description="The \'*\' denotes a positive integer. Example: <property property name=\"alternatedocroot_1\" value=\"from=/my.jpg dir=/srv/images/jpg\" />") @PropertyDesc(name="send-error_*",description="The \'*\' denotes a positive integer. Example: <property name=\"send-error_1\" value=\"code=401 path=/myhost/401.html reason=MY-401-REASON\" />") @PropertyDesc(name="redirect_*",description="The \'*\' denotes a positive integer. Example: <property name=\"redirect_1\" value=\"from=/dummy url-prefix=http://etude\" />") List<org.jvnet.hk2.config.types.Property> getProperty()Properties.- Specified by:
getPropertyin interfaceorg.jvnet.hk2.config.types.PropertyBag
-