<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/zookeeper"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:tool="http://www.springframework.org/schema/tool"
			xmlns:integration="http://www.springframework.org/schema/integration"
			targetNamespace="http://www.springframework.org/schema/integration/zookeeper"
			elementFormDefault="qualified">

	<xsd:import namespace="http://www.springframework.org/schema/beans"/>
	<xsd:import namespace="http://www.springframework.org/schema/tool"/>
	<xsd:import namespace="http://www.springframework.org/schema/integration"
				schemaLocation="https://www.springframework.org/schema/integration/spring-integration.xsd"/>

	<xsd:annotation>
		<xsd:documentation><![CDATA[
			Defines the configuration elements for the Spring Integration
			Zookeeper support.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="leader-listener">
		<xsd:annotation>
			<xsd:documentation>
				The definition for the Spring Integration Zookeeper leader listener
				'org.springframework.integration.zookeeper.leader.LeaderInitiator'
				to automatically start/stop endpoints based on the Role.
				The 'role' attribute here is matched to 'role' attributes on associated 'SmartLifecycle'
				beans.
				Endpoint roles can be defined in XML configuration or via '@Role' annotations.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attributeGroup ref="integration:smartLifeCycleAttributeGroup"/>
			<xsd:attribute name="id" type="xsd:string"/>
			<xsd:attribute name="client" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A reference to a CuratorFramework bean.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.apache.curator.framework.CuratorFramework"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="candidate" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A reference to a Candidate bean.
						Or this or 'role' option can be provided, but not both.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.integration.leader.Candidate"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="path">
				<xsd:annotation>
					<xsd:documentation>
						The path in zookeeper.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>
