<?xml version="1.0"?>
<!--
  ~ Copyright The mod_cluster Project Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<mbeans-descriptors>

  <mbean name="ModClusterListener"
         description="Lifecycle listener for mod_cluster"
         domain="Catalina"
         group="Listener"
         type="org.jboss.modcluster.container.tomcat.ModClusterListener">

    <attribute name="className"
               description="Fully qualified class name of the managed object"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="containerName"
               description="Object name of the container"
               type="javax.management.ObjectName"/>

    <attribute name="connectorAddress"
               description="Address of a defined Tomcat connector to register with the proxy."
               type="java.lang.String"/>

    <attribute name="connectorPort"
               description="Port of a defined Tomcat connector to register with the proxy."
               type="int"/>

    <attribute name="proxyConfiguration"
               description="Get the mod_cluster configuration, per proxy"
               type="java.util.Map"
               writeable="false"/>

    <attribute name="proxyInfo"
               description="Get information about what is registered with each mod_cluster, per proxy"
               type="java.util.Map"
               writeable="false"/>

    <attribute name="proxyList"
               description="Comma delimited list of proxy servers"
               type="java.lang.String"/>

    <attribute name="socketTimeout"
               description="Connection timeout for communication with the proxy"
               type="int"/>

    <attribute name="advertise"
               description="Enable autodiscovery of httpd servers"
               type="boolean"/>

    <attribute name="advertiseGroupAddress"
               description="Multicast address for discovery"
               type="java.lang.String"/>

    <attribute name="advertisePort"
               description="Multicast port for discovery"
               type="int"/>

    <attribute name="advertiseSecurityKey"
               description="Security key for discovery"
               type="java.lang.String"/>

    <attribute name="domain"
               description="Domain parameter, which allows tying a jvmRoute to a particular domain"
               type="java.lang.String"/>

    <attribute name="flushPackets"
               description="Allows controlling flushing of packets"
               type="boolean"/>

    <attribute name="flushWait"
               description="Time in ms to wait before flushing packets"
               type="int"/>

    <attribute name="ping"
               description="Time in s to wait for a pong answer to a ping"
               type="int"/>

    <attribute name="smax"
               description="Maximum time on seconds for idle connections above smax"
               type="int"/>

    <attribute name="balancer"
               description="Name of the balancer"
               type="java.lang.String"/>

    <attribute name="stickySession"
               description="Enables sticky sessions"
               type="boolean"/>

    <attribute name="stickySessionRemove"
               description="Remove session when the request cannot be routed to the right node"
               type="boolean"/>

    <attribute name="stickySessionForce"
               description="Return an error when the request cannot be routed to the right node"
               type="boolean"/>

    <attribute name="workerTimeout"
               description="Timeout to wait for an available worker (default is no wait)"
               type="int"/>

    <attribute name="maxAttempts"
               description="Maximum number of attempts to send the request to the backend server"
               type="int"/>

    <attribute name="initialLoad"
               description="Initial load to pre-populate to historical load calculation data in order to ramp-up load to the node"
               type="int"/>

    <operation name="refresh"
               description="Refresh configuration"
               impact="ACTION"
               returnType="void"/>

    <operation name="reset"
               description="Move the node out of an error state"
               impact="ACTION"
               returnType="void"/>

    <operation name="disable"
               description="Disable all webapps for all engines"
               impact="ACTION"
               returnType="boolean"/>

    <operation name="disableContext"
               description="Disable a single webapp"
               impact="ACTION"
               returnType="boolean">
      <parameter name="hostName"
                 description="Host name of the target webapp"
                 type="java.lang.String"/>
      <parameter name="contextPath"
                 description="Context path of the webapp"
                 type="java.lang.String"/>
    </operation>

    <operation name="enable"
               description="Enable all webapps for all engines"
               impact="ACTION"
               returnType="boolean"/>

    <operation name="enableContext"
               description="Enable a single webapp"
               impact="ACTION"
               returnType="boolean">
      <parameter name="hostName"
                 description="Host name of the target webapp"
                 type="java.lang.String"/>
      <parameter name="contextPath"
                 description="Context path of the webapp"
                 type="java.lang.String"/>
    </operation>

    <operation name="stop"
               description="Gracefully stops all webapps for all engines"
               impact="ACTION"
               returnType="boolean">
      <parameter name="timeout"
                 description="Session draining timeout"
                 type="long"/>
      <parameter name="unit"
                 description="Time unit of the timeout parameter"
                 type="java.util.concurrent.TimeUnit"/>
    </operation>

    <operation name="stopContext"
               description="Gracefully stops a single webapp"
               impact="ACTION"
               returnType="boolean">
      <parameter name="hostName"
                 description="Host name of the target webapp"
                 type="java.lang.String"/>
      <parameter name="contextPath"
                 description="Context path of the webapp"
                 type="java.lang.String"/>
      <parameter name="timeout"
                 description="Session draining timeout"
                 type="long"/>
      <parameter name="unit"
                 description="Time unit of the timeout parameter"
                 type="java.util.concurrent.TimeUnit"/>
    </operation>

    <operation name="addProxy"
               description="Add a proxy"
               impact="ACTION"
               returnType="void">
      <parameter name="host"
                 description="Proxy address"
                 type="java.lang.String"/>
      <parameter name="port"
                 description="Proxy port"
                 type="int"/>
    </operation>

    <operation name="removeProxy"
               description="Remove a proxy"
               impact="ACTION"
               returnType="void">
      <parameter name="host"
                 description="Proxy address"
                 type="java.lang.String"/>
      <parameter name="port"
                 description="Proxy port"
                 type="int"/>
    </operation>

  </mbean>

</mbeans-descriptors>
