All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.spring.spring-integration-subscription-config.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:int="http://www.springframework.org/schema/integration"
       xmlns:int-http="http://www.springframework.org/schema/integration/http"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
            http://www.springframework.org/schema/integration/http http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">

    <!-- HTTP Subscription Health -->
    <int-http:inbound-gateway
            request-channel="inboundSubscriptionHealthChannel"
            path="/subscription/health"
            supported-methods="GET"
            error-channel="errorChannel"
    />

    <int:service-activator
            id="subscriptionManagerServiceHealthActivator"
            input-channel="inboundSubscriptionHealthChannel"
            ref="subscriptionManagerService"
            method="health"
            />

    <!-- Inbound HTTP Subscription Management -->
    <int-http:inbound-gateway
            request-channel="inboundSubscriptionRouterChannel"
            path="/subscription"
            supported-methods="GET,DELETE"
            error-channel="errorChannel"
    />

    <int:router
            input-channel="inboundSubscriptionRouterChannel"
            expression="headers.http_requestMethod">
        <int:mapping value="GET" channel="inboundSubscriptionAsStringChannel"/>
        <int:mapping value="DELETE" channel="inboundSubscriptionResetChannel"/>
    </int:router>

    <int:service-activator
            id="subscriptionManagerServiceAsStringActivator"
            input-channel="inboundSubscriptionAsStringChannel"
            ref="subscriptionManagerService"
            method="asString"
            />

    <int:service-activator
            id="subscriptionManagerServiceResetActivator"
            input-channel="inboundSubscriptionResetChannel"
            ref="subscriptionManagerService"
            method="reset"
            />

    <int:channel id="inboundSubscriptionRegistrationChannel">
        <int:interceptors>
            <int:wire-tap id="inboundSubscriptionRegistrationChannelWireTapLogger" channel="subscriptionRegistrationChannelLogger"/>
        </int:interceptors>
    </int:channel>

    <int:logging-channel-adapter
            id="subscriptionRegistrationChannelLogger"
            level="INFO"
            logger-name="SubscriptionRegistrationChannel"
            log-full-message="true"
            />

    <int-http:inbound-gateway
            request-channel="inboundSubscriptionRegistrationChannel"
            path="/subscription"
            supported-methods="POST"
            request-payload-type="java.lang.String"
            error-channel="errorChannel"
    />

    <int:service-activator
            id="subscriptionManagerServiceRegisterSubscriptionActivator"
            input-channel="inboundSubscriptionRegistrationChannel"
            ref="subscriptionManagerService"
            method="registerSubscription"
            />

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy