<?xml version='1.0' encoding='UTF-8'?>
<!-- boolean
-->
<!ENTITY % boolean "(yes | no | on | off | 1 | 0 | true | false)">

<!-- network-config element contains complete Grizzly configuration.
     Element property: declares public Grizzly configuration properties
     Element transports: describes low level transports configuration. 
             Like tcp, udp, ssl transports configuration
     Element protocols: describes higher level protocols like: http, https,
             iiop
     Element listeners: binds protocols with lower level transports
-->
<!ELEMENT network-config (property*, transports, protocols, listeners)>

<!-- property element defines some implementation specific properties, they
     could be different from implementation to implementation, so it's not 
     possible to define them neither like element nor attribute
     Attribute name: property name
     Attribute value: property value
-->
<!ELEMENT property EMPTY>
<!ATTLIST property
    name CDATA #IMPLIED
    value CDATA #IMPLIED
  >

<!-- Transports section describes network transports and its properties.
     Element property: declares network-config public properties
     Element selection-key-handler: defines public SelectionKey handler, 
             which could be referenced within transport
     Element transport: defines one specific transport.
-->
<!ELEMENT transports (property*, selection-key-handler*, transport*)>

<!-- selection-key-handler elements defines transport's SelectionKey handling
     logic
     Element property: declares selection-key-handler specific properties
     Attribute name: SelectionKey handler name, which could be used as 
               reference
     Attribute classname: SelectionKey handler implementation class
     Attribute idle-key-timeout: timeout, after which idle key will be 
	       cancelled and channel closed
-->
<!ELEMENT selection-key-handler (property*)>
<!ATTLIST selection-key-handler
    name CDATA #IMPLIED
    classname CDATA #IMPLIED
    idle-key-timeout CDATA #IMPLIED
  >

<!-- Transport element defines one specific transport and its properties
     Element property: declares transport specific properties
     Element selection-key-handler: define SelectionKey handler, which
             will be used with transport. SelectionKey handler should defined 
             either by internal selection-key-handler element, or referenced by 
             selectioin-key-handler attribute. It's not allowed to have both
             definitions at the same time!
     Attribute name: transport's name, which could be used as reference
     Attribute classname: name of class, which implements transport logic
     Attribute selection-key-handler: use public SelectionKey handler, which
               was defined earlier in the document. 
               SelectionKey handler should defined either by internal 
               selection-key-handler element, or referenced by 
               selectioin-key-handler attribute. It's not allowed to have 
               both definitions at the same time!
-->
<!ELEMENT transport (property*, selection-key-handler?)>
<!ATTLIST transport
    name CDATA #REQUIRED
    classname CDATA #IMPLIED
    selection-key-handler CDATA #IMPLIED
  >

<!-- Protocols element contains the description of higher level protocols 
     like: http, https, iiop, etc.
     Element property: declares properties, associated with the protocols 
             element
     Element protocol-filter: defines public protocol filter(s),which 
             could be referenced within protocol-chain element(s)
     Element protocol-chain: defines public protocol chain(s), which could
             be referenced within protocol-chain-instance-handler element(s)
     Element protocol-chain-instance-handler: defines public protocol chain
             instance handler(s), which could be referenced within 
             protocol element(s)
     Element finder: defines public finder element(s), which could be 
             referenced within port-unification element(s)
     Element port-unification: defines public port-unification element(s),
             which could be referenced within protocol element(s)
     Element ssl: defines public ssl element(s), which could be referenced 
             within protocol element(s)
     Element protocol: defines one specific protocol
-->
<!ELEMENT protocols (property*, protocol-filter*, protocol-chain*, 
                     protocol-chain-instance-handler*,
                     finder*, port-unification*, ssl*, protocol*)>

<!-- Protocol element defines one single high-level protocol like: http, 
     https, iiop, etc.
     Element property: declares properties, associated with the protocol
     Element ssl: protocol security (ssl) configuration.
             SSL configuration should be defined either by internal 
             ssl element, or referenced by ssl attribute. 
             It's not allowed to have both definitions at the same time!
     Element port-unification: defines port-unification logic, if it is 
             required to handle more than one high level protocol on a single 
             listener.
             Port unification configuration should be defined either by internal 
             port-unification element, or referenced by port-unification 
             attribute. It's not allowed to have both 
             definitions at the same time!
     Element protocol-chain-instance-handler: protocol chain instance handler 
             logic.
             Protocol chain instance handler configuration should be defined 
             either by internal protocol-chain-instance-handler element, 
             or referenced by protocol-chain-instance-handler attribute. 
             It's not allowed to have both definitions at the same time!
     Attribute name: protocol name, which could be used as reference
     Attribute ssl: uses ssl definition, which was described earlier 
               in the document.
               SSL configuration should defined either by internal 
               ssl element, or referenced by ssl attribute. 
               It's not allowed to have both definitions at the same time!
     Attribute port-unification: uses port-unification definition, which was
               described earlier in the document
               Port unification configuration should be defined either by 
               internal port-unification element, or referenced by 
               port-unification attribute. It's not allowed to have both 
               definitions at the same time!
     Attribute protocol-chain-instance-handler: uses protocol chain instance 
               handler, defined before in the document
               Protocol chain instance handler configuration should be defined 
               either by internal protocol-chain-instance-handler element, 
               or referenced by protocol-chain-instance-handler attribute. 
               It's not allowed to have both definitions at the same time!
     Attribute max-selectors: maximum size of a temporary selector pool, 
               used for blocking read/write operations
     Attribute byte-buffer-type: type of ByteBuffer, which will be used with 
               transport. Possible values are: HEAP and DIRECT
     Attribute read-timeout: read operation timeout
     Attribute write-timeout: write operation timeout
     Attribute oob-inline: when the oob-inline option is set, any TCP urgent 
               data received on the socket will be received through
	       the socket input stream. Boolean attribute, possible
	       values are true or false
-->
<!ELEMENT protocol (property*, ssl?, port-unification?, 
	                      protocol-chain-instance-handler?)>
<!ATTLIST protocol
    name CDATA #REQUIRED
    ssl CDATA #IMPLIED
    port-unification CDATA #IMPLIED
    protocol-chain-instance-handler CDATA #IMPLIED
    max-selectors CDATA #IMPLIED
    byte-buffer-type (HEAP|DIRECT) "HEAP"
    read-timeout CDATA #IMPLIED
    write-timeout CDATA #IMPLIED
    oob-inline %boolean; "true"
  >

<!-- protocol-chain-instance-handler defines protocol chain instantiation and 
     releasing logic
     Element property: set of protocol chain instance handler properties
     Element protocol-chain: defines protocol chain configuration
             Protocol chain configuration should be defined either by 
             internal protocol-chain element, or referenced by protocol-chain 
             attribute. It's not allowed to have both definitions 
             at the same time!
     Attribute name: protocol chain instance handler name, which could be used 
               as reference
     Attribute classname: Protocol chain instance handler implementation class
     Attribute protocol-chain: use public protocol chain configuration, which 
               was defined earlier in the document.
               Protocol chain configuration should be defined either by 
               internal protocol-chain element, or referenced by protocol-chain 
               attribute. It's not allowed to have both definitions 
               at the same time!
-->
<!ELEMENT protocol-chain-instance-handler (property*, protocol-chain)>
<!ATTLIST protocol-chain-instance-handler
    name CDATA #IMPLIED
    classname CDATA #IMPLIED
    protocol-chain CDATA #IMPLIED
  >

<!-- protocol-chain element defines the type of protocol chain and 
     describes protocol filters, which will participate in request 
     processing
     Element property: set of protocol chain properties
     Element protocol-filter: defines protocol filter sequence, which will 
             process a request.
             Protocol filters configuration should be defined either by 
             internal protocol-filter elements chain, or referenced by 
             protocol-filters attribute. It's not allowed to have 
             both definitions at the same time!
     Attribute name: protocol chain name, which could be used as reference
     Attribute protocol-filters: comma separated protocol filter names, 
               which will process a request.
               Protocol filters configuration should be defined either by 
               internal protocol-filter elements chain, or referenced by 
               protocol-filters attribute. It's not allowed to have 
               both definitions at the same time!
     Attribute type: protocol chain type. Could be STATEFUL or STATELESS
-->
<!ELEMENT protocol-chain (property*, protocol-filter*)>
<!ATTLIST protocol-chain
    name CDATA #IMPLIED
    protocol-filters CDATA #IMPLIED
    type (STATELESS|STATEFUL) "STATELESS"
  >

<!-- protocol-filter defines single protocol filter in a sequence
     Element property: properties, associated with the protocol-filter
     Attribute name: protocol filter name, which could be used as reference
     Attribute classname: protocol filter implementation class
-->
<!ELEMENT protocol-filter (property*)>
<!ATTLIST protocol-filter
    name CDATA #IMPLIED
    classname CDATA #REQUIRED
  >

<!-- port-unification defines logic of hosting several protocol on a single
     tcp port.
     Element property: set of port-unification properties
     Element finder: set of protocol finders, which will be responsible 
             for protocol recognition
             Protocol finder(s) configuration should be defined either by 
             internal finder elements chain, or referenced by 
             finders attribute. It's not allowed to have 
             both definitions at the same time!
     Attribute name: port-unification name, which could be used as reference
     Attribute property: set of port-unification properties
     Attribute finders: set of comma separated protocol finder names, which 
               will be responsible for protocol recognition.
               Protocol finder(s) configuration should be defined either by 
               internal finder elements chain, or referenced by 
               finders attribute. It's not allowed to have 
               both definitions at the same time!
     Attribute classname: port unification logic implementation class
-->

<!ELEMENT port-unification (property*, finder*)>
<!ATTLIST port-unification
    name CDATA #IMPLIED
    finders CDATA #IMPLIED
    classname CDATA #IMPLIED
  >


<!-- finder describes a protocol finder/recognizer, which is able to recognize
     whether incoming request belongs to the specific protocol or not. If yes
     - finder forwards request processing to a specific handler.
     Element property: set of finder properties
     Element protocol: protocol, which is responsible for processing a 
             request, recognized by finder.
             Protocol configuration should be defined either by internal
             protocol element, or referenced by protocol attribute. 
             It's not allowed to have both definitions at the same time!
     Attribute name: finder name, which could be used as reference
     Attribute protocol: reference to a protocol, which was defined before.
               Protocol configuration should be defined either by internal
               protocol element, or referenced by protocol attribute. 
               It's not allowed to have both definitions at the same time!
     Attribute classname: finder logic implementation class
-->
<!ELEMENT finder (property*, protocol?)>
<!ATTLIST finder
    name CDATA #IMPLIED
    protocol CDATA #IMPLIED
    classname CDATA #IMPLIED
  >

<!-- ssl
    Define SSL processing parameters                                  

  attributes
    name
    
        name of this SSL configuration
    cert-nickname                                                          
    
        nickname of the server certificate in the certificate         
        database or the PKCS#11 token. In the certificate, the name   
        format is tokenname:nickname. Including the tokenname: part   
        of the name in this attribute is optional.                    
    client-auth-enabled                                                    
    
        Determines whether SSL3 client authentication is performed on 
        every request, independent of ACL-based access control.       
    ssl2-ciphers                                                           
    
        A comma-separated list of the SSL2 ciphers used, with the     
        prefix + to enable or - to disable, for example +rc4. Allowed 
        values are rc4, rc4export, rc2, rc2export, idea, des,         
        desede3. If no value is specified, all supported ciphers are  
        assumed to be enabled. NOT Used in PE                         
    ssl2-enabled                                                           
    
        Determines whether SSL2 is enabled. NOT Used in PE. SSL2 is   
        not supported by either iiop or web-services. When this       
        element is used as a child of the iiop-listener element then  
        the only allowed value for this attribute is "false".         
    ssl3-enabled                                                           
    
        Determines whether SSL3 is enabled.                           

        If both SSL2 and SSL3 are enabled for a virtual server, the server 
    
        tries SSL3 encryption first. If that fails, the server tries SSL2  
    
        encryption.                                                        
    

    ssl3-tls-ciphers                                                       
    
        A comma-separated list of the SSL3 ciphers used, with the     
        prefix + to enable or - to disable, for example               
        +SSL_RSA_WITH_RC4_128_MD5. Allowed SSL3/TLS values are those  
        that are supported by the JVM for the given security provider 
        and security service configuration. If no value is specified, 
        all supported ciphers are assumed to be enabled.              
    tls-enabled                                                            
    
        Determines whether TLS is enabled.                            
    tls-rollback-enabled                                                   
    
        Determines whether TLS rollback is enabled. TLS rollback      
        should be enabled for Microsoft Internet Explorer 5.0 and     
        5.5. NOT Used in PE                                           

  Used in:
    http-listener, iiop-listener, jmx-connector, ssl-client-config    
-->
<!ELEMENT ssl (property*)>

<!ATTLIST ssl
    name CDATA #IMPLIED
    cert-nickname CDATA #REQUIRED
    ssl2-enabled %boolean; "false"
    ssl2-ciphers CDATA #IMPLIED
    ssl3-enabled %boolean; "true"
    ssl3-tls-ciphers CDATA #IMPLIED
    tls-enabled %boolean; "true"
    tls-rollback-enabled %boolean; "true"
    client-auth-enabled %boolean; "false"
  >

<!-- listeners element contains set of listener, which bind protocol to a 
     specific endpoint to listen on
     Element thread-pool: defines public thread-pool(s), 
                         which could be referenced within listener element(s)
     Element listener: declares one single listener
-->
<!ELEMENT listeners (thread-pool*, listener*)>

<!-- listener element binds protocol to a specific endpoint to listen on
     Element property: set of listener properties
     Element thread-pool: defines worker threads pool, which will be used
             during request processing.
             Thread pool configuration should be defined either by 
             internal thread-pool element, or referenced by thread-pool 
             attribute. It's not allowed to have both definitions 
             at the same time!
     Attribute name: listener name, which could be used as reference
     Attribute transport: reference to a low-level transport
     Attribute protocol: reference to a protocol
     Attribute thread-pool: reference to a thread-pool, defined earlier 
               in the document.
               Thread pool configuration should be defined either by 
               internal thread-pool element, or referenced by thread-pool 
               attribute. It's not allowed to have both definitions 
               at the same time!
     Attribute host: host name to listen on
     Attribute port: port to listen on
-->
<!ELEMENT listener (property*, thread-pool?)>
<!ATTLIST listener
    name CDATA #REQUIRED
    transport CDATA #REQUIRED
    protocol CDATA #REQUIRED
    thread-pool CDATA #IMPLIED
    host CDATA #IMPLIED
    port CDATA #IMPLIED
  >


<!-- thread-pool element defines worker threads pool implementation, 
     which will be used during request processing
     Element property: set of thread-pool properties
     Attribute name: thread-pool name, which could be used as reference
     Attribute classname: thread pool implementation class
     Attribute max-tasks: max number of tasks, thread pool can put on queue
     Attribute min-threads: min number of threads, thread pool has initialized
			   and ready
     Attribute max-threads: max number of threads, thread pool could have 
			 initialized and ready
-->
<!ELEMENT thread-pool (property*)>
<!ATTLIST thread-pool
    name CDATA #IMPLIED
    classname CDATA #IMPLIED
    max-tasks CDATA #IMPLIED
    min-threads CDATA #IMPLIED
    max-threads CDATA #IMPLIED
>
