Interface VirtualServer

All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy, org.jvnet.hk2.config.types.PropertyBag

public interface VirtualServer extends org.jvnet.hk2.config.ConfigBeanProxy, org.jvnet.hk2.config.types.PropertyBag
Configuration of Virtual Server

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 Details

  • Method Details

    • getId

      @NotNull @NotNull String getId()
      Gets the value of the id property.

      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

      void setId(String id) throws PropertyVetoException
      Sets the value of the id property.
      Parameters:
      id - allowed object is String
      Throws:
      PropertyVetoException
    • getHttpListeners

      @Deprecated String getHttpListeners()
      Deprecated.
      Gets the value of the httpListeners property.

      >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 void setHttpListeners(String httpListeners) throws PropertyVetoException
      Deprecated.
      Sets the value of the httpListeners property.
      Parameters:
      httpListeners - allowed object is String
      Throws:
      PropertyVetoException
    • getNetworkListeners

      String getNetworkListeners()
      Gets the value of the networkListeners property.
      Returns:
      possible object is String
    • setNetworkListeners

      void setNetworkListeners(String networkListeners) throws PropertyVetoException
      Sets the value of the networkListeners property.
      Parameters:
      networkListeners - object is String
      Throws:
      PropertyVetoException
    • getDefaultWebModule

      String getDefaultWebModule()
      Gets the value of the defaultWebModule property.

      Standalone web module associated with this virtual server by default.

      Returns:
      possible object is String
    • setDefaultWebModule

      void setDefaultWebModule(String defaultWebModule) throws PropertyVetoException
      Sets the value of the defaultWebModule property.
      Parameters:
      defaultWebModule - allowed object is String
      Throws:
      PropertyVetoException
    • getHosts

      @NotNull @NotNull String getHosts()
      Gets the value of the hosts property.

      A comma-separated list of values allowed in the Host request 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

      void setHosts(String hosts) throws PropertyVetoException
      Sets the value of the hosts property.
      Parameters:
      hosts - allowed object is String
      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 the state property.

      Determines whether Virtual Server is active(on) or inactive(off, disable). The default is on (active).

      When inactive, a Virtual Server does not service requests. Off returns a 404: Status code (404) indicating that the requested resource is not available, disabled returns a 403: Status code (403) indicating the server understood the request but refused to fulfill it.

      Returns:
      possible object is String
    • setState

      void setState(String state) throws PropertyVetoException
      Sets the value of the state property.
      Parameters:
      state - allowed object is String
      Throws:
      PropertyVetoException
    • getDocroot

      String getDocroot()
      Gets the value of the docroot property.

      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

      void setDocroot(String docroot) throws PropertyVetoException
      Sets the value of the docroot property.
      Parameters:
      docroot - allowed object is String
      Throws:
      PropertyVetoException
    • getAccessLog

      String getAccessLog()
      Gets the value of the accessLog property.
      Returns:
      possible object is String
    • setAccessLog

      void setAccessLog(String accessLog) throws PropertyVetoException
      Sets the value of the accessLog property.
      Parameters:
      accessLog - allowed object is String
      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 the ssoEnabled property.

      Possible values: true/false/inherit.

      Returns:
      possible object is String
    • setSsoEnabled

      void setSsoEnabled(String ssoEnabled) throws PropertyVetoException
      Sets the value of the ssoEnabled property.
      Parameters:
      ssoEnabled - allowed object is String
      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

      void setAccessLoggingEnabled(String accessLoggingEnabled) throws PropertyVetoException
      Sets the value of the access logging enabled property.
      Parameters:
      accessLoggingEnabled - allowed object is String
      Throws:
      PropertyVetoException
    • getLogFile

      String getLogFile()
      Gets the value of the logFile property.

      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

      void setLogFile(String logFile) throws PropertyVetoException
      Sets the value of the logFile property.
      Parameters:
      logFile - allowed object is String
      Throws:
      PropertyVetoException
    • getHttpAccessLog

      HttpAccessLog getHttpAccessLog()
      Gets the value of the httpAccessLog property.
      Returns:
      possible object is HttpAccessLog
    • setHttpAccessLog

      void setHttpAccessLog(HttpAccessLog httpAccessLog) throws PropertyVetoException
      Sets the value of the httpAccessLog property.
      Parameters:
      httpAccessLog - allowed object is HttpAccessLog
      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 any JSESSIONIDSSO cookies associated with the web applications deployed to this virtual server. Applicable only if the ssoEnabled property is set to true. To set the Secure attribute of a JSESSIONID cookie, use the cookieSecure cookie-properties property in the sun-web.xml file. Valid values: true, false, dynamic.
    • setSsoCookieSecure

      void setSsoCookieSecure(String ssoCookieSecure)
    • getSsoCookieHttpOnly

      String getSsoCookieHttpOnly()
    • setSsoCookieHttpOnly

      void setSsoCookieHttpOnly(String httpOnly)
    • addNetworkListener

      default void addNetworkListener(String name) throws PropertyVetoException
      Throws:
      PropertyVetoException
    • removeNetworkListener

      default void removeNetworkListener(String name) throws PropertyVetoException
      Throws:
      PropertyVetoException
    • findNetworkListener

      default org.glassfish.grizzly.config.dom.NetworkListener findNetworkListener(String name)
    • findNetworkListeners

      default List<org.glassfish.grizzly.config.dom.NetworkListener> 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:
      getProperty in interface org.jvnet.hk2.config.types.PropertyBag