<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.mulesource.org/schema/mule/multicast/2.0"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:mule="http://www.mulesource.org/schema/mule/core/2.0"
            xmlns:udp="http://www.mulesource.org/schema/mule/udp/2.0"
            targetNamespace="http://www.mulesource.org/schema/mule/multicast/2.0"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:import namespace="http://www.mulesource.org/schema/mule/core/2.0" 
                schemaLocation="http://www.mulesource.org/schema/mule/core/2.0/mule.xsd" />
    <xsd:import namespace="http://www.mulesource.org/schema/mule/udp/2.0"
                schemaLocation="http://www.mulesource.org/schema/mule/udp/2.0/mule-udp.xsd"/>

    <xsd:element name="connector" substitutionGroup="mule:abstract-connector">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="udp:udpConnectorType">
                    <xsd:attribute name="timeToLive" type="mule:substitutableLong">
                        <xsd:annotation>
                            <xsd:documentation>
                                Set the time-to-live value for multicast packets to control their scope.
                                It must be in the range 0 to 255 (inclusive).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="loopback" type="mule:substitutableBoolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                Enable local loopback of multicast datagrams.
                                The option is used by the platform's networking code as a hint for setting
                                whether multicast data will be looped back to the local socket.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="inbound-endpoint" type="inboundEndpointType" substitutionGroup="mule:abstract-inbound-endpoint"/>
    <xsd:complexType name="inboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:inboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="outbound-endpoint" type="outboundEndpointType" substitutionGroup="mule:abstract-outbound-endpoint"/>
    <xsd:complexType name="outboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:outboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="endpoint" type="globalEndpointType" substitutionGroup="mule:abstract-global-endpoint"/>
    <xsd:complexType name="globalEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:globalEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:attributeGroup name="addressAttributes">
        <xsd:attribute name="host" type="xsd:string"/>
        <xsd:attribute name="port" type="mule:substitutablePortNumber"/>
    </xsd:attributeGroup>

</xsd:schema>
