<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/stream"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:integration="http://www.springframework.org/schema/integration"
			targetNamespace="http://www.springframework.org/schema/integration/stream"
			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 Spring Integration Stream-based Channel Adapters.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="stdin-channel-adapter">
		<xsd:annotation>
			<xsd:documentation>
				Defines a Polling Channel Adapter for the
				'org.springframework.integration.stream.CharacterStreamReadingMessageSource'
				that reads from stdin (System.in).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attributeGroup ref="integration:channelAdapterAttributes"/>
			<xsd:attribute name="charset" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The charset to use when converting the byte stream from stdin to
						String.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="detect-eof">
				<xsd:annotation>
					<xsd:documentation>
						When 'true' an application event is published when EOF is detected
						on stdin. To facilitate this, the poller thread will block until data is
						present or EOF is detected.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="xsd:boolean xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="stdout-channel-adapter" type="consoleOutboundChannelAdapterType"/>

	<xsd:element name="stderr-channel-adapter" type="consoleOutboundChannelAdapterType"/>

	<xsd:complexType name="consoleOutboundChannelAdapterType">
		<xsd:annotation>
			<xsd:documentation>
				Configures a Consumer Endpoint for the
				'org.springframework.integration.stream.CharacterStreamWritingMessageHandler' that writes to stdout
				(System.out) or to stderr (System.err) depending on the element name.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="request-handler-advice-chain" type="integration:handlerAdviceChainType"
						 minOccurs="0" maxOccurs="1"/>
		</xsd:all>
		<xsd:attributeGroup ref="integration:channelAdapterAttributes"/>
		<xsd:attribute name="charset" type="xsd:string"/>
		<xsd:attribute name="append-newline" type="xsd:string" default="false"/>
		<xsd:attribute name="order">
			<xsd:annotation>
				<xsd:documentation>
					Specifies the order for invocation when this endpoint is connected as a
					subscriber to a SubscribableChannel.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

</xsd:schema>
