<!--
 The contents of this file are subject to the terms 
 of the Common Development and Distribution License 
 (the "License").  You may not use this file except 
 in compliance with the License.
 
 You can obtain a copy of the license at 
 glassfish/bootstrap/legal/CDDLv1.0.txt or 
 https://glassfish.dev.java.net/public/CDDLv1.0.html. 
 See the License for the specific language governing 
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL 
 HEADER in each file and include the License file at 
 glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable, 
 add the following below this CDDL HEADER, with the 
 fields enclosed by brackets "[]" replaced with your 
 own identifying information: Portions Copyright [yyyy] 
 [name of copyright owner]
-->

<!ENTITY % boolean "(yes | no | on | off | 1 | 0 | true | false)">


<!-- load balancer Configuration
     Configure load balancer to load balance the request. It contains 
     configuration details related to cluster, and
     properties related to load balancer.	
-->

<!ELEMENT loadbalancer (cluster*, property*)>

<!--  Cluster Configuration
      Provides configuration information related to all clusters to   
      which loadbalancer would route the requests.

      name 	identifies the cluster
-->

<!ELEMENT cluster (instance*, web-module*, health-checker?)>
<!ATTLIST cluster name CDATA #REQUIRED>


<!--   Server instance configuration

      name	  identifies the server instance within the cluster
         
      enabled	  specifies whether instance is active (enabled)  
                  for requests to be load balanced to it.	
         
      disable-timeout-in-minutes  specifies the quiescing timeout interval in  
                       		  seconds, upon elapse of which load balancer 
				  would close all the open connections related 
				  to the instance being disabled and no further 
				  requests would be routed to the instance. 
				  Default value would be 31 minutes (i.e. more
				  than the default session idle timeout which is
				  30 minutes).

      listeners	     URLs of the listeners. Is a muti-valued, space
		     delimited list of URLs. 
                     For example: "http://server1:80 https://server2:80"
-->

<!ELEMENT instance EMPTY>
<!ATTLIST instance   name             CDATA     #REQUIRED
                     enabled          %boolean; "true"
                     disable-timeout-in-minutes  CDATA     "31"
                     listeners        CDATA     #REQUIRED>


<!-- Deployed Web Modules (Applications).
    
    context-root   context root of the application deployed

    enabled	    signifies whether the application is enabled or
         	    disabled. Default value would be "true".

    disable-timeout-in-minutes   specifies the quiescing timeout interval after 
                    		 which no further requests would be sent to the 
		    		 application that has been disabled. Application
				 is  identified by the application context root
				 as specified in web-module element. 
				 Default value would be 31 minutes (i.e. more
				 than the default session idle timeout which is
				 30 minutes).
-->

<!ELEMENT web-module EMPTY>
<!ATTLIST web-module       context-root    CDATA     #REQUIRED
                           enabled         %boolean; "true"
                           disable-timeout-in-minutes CDATA     "31"> 


<!-- Health Checker Configuration.

     Each cluster would be configured for a ping based health check     
     mechanism. 

     url	    URL to ping so as to determine the health state
		    of a listener.

     interval-in-seconds      specifies the interval in seconds at which health 
			      checks of unhealthy instances carried out to check
			      if the instances has turned healthy. Default
			      value is "30" seconds. A value of "0" would imply 			      that health check is disabled. 

     timeout-in-seconds	    timeout interval in seconds within which response
                    	    should be obtained for a health check request;
                    	    else the instance would be considered unhealthy. 
                    	    Default value would be "10".
-->

<!ELEMENT health-checker EMPTY>
<!ATTLIST health-checker  url        CDATA               "/"
                          interval-in-seconds   CDATA               "30"
                          timeout-in-seconds    CDATA               "10">   


<!-- properties are internal configuaration parameters of LB.

     Name               			Value

     response-timeout-in-seconds    timeout interval in seconds within which 
				    response should be obtained for a request 
				    load balanced; else the instance would be 
				    considered unhealthy. Default value would 
				    be "60".
     
     
     reload-poll-interval-in-seconds  interval in seconds at which load balancer
                            	      would detect if loadbalancer.xml timestamp
                            	      has changed. If it has change loadbalancer
                            	      would reload it. Default value of "0" 
				      would imply that polling is disabled.

     https-routing      	      flag ("true" | "false") that determines  
                        	      whether the load balancer should route the
                        	      incoming HTTPS request as HTTPS request to
                        	      the instance. Default value would be 
				      "false".

     require-monitor-data             flag ("true" | "false")  that determines
                                      whether monitoring is switched on or not.
                                      Default value would be "false".
     
-->

<!ELEMENT property (description?)>
<!ATTLIST property        name      CDATA      #REQUIRED
                          value     CDATA      #REQUIRED> 


<!-- Textual description of a configured property -->
<!ELEMENT description (#PCDATA)>

