Example usage for org.springframework.integration.endpoint MessageProducerSupport start

List of usage examples for org.springframework.integration.endpoint MessageProducerSupport start

Introduction

In this page you can find the example usage for org.springframework.integration.endpoint MessageProducerSupport start.

Prototype

@Override
    public final void start() 

Source Link

Usage

From source file:org.springframework.integration.x.gemfire.GemFireMessageBus.java

private void doRegisterConsumer(String name, MessageChannel moduleInputChannel,
        final Collection<MediaType> acceptedMediaTypes, MessageProducerSupport adapter) {
    DirectChannel bridgeToModuleChannel = new DirectChannel();
    bridgeToModuleChannel.setBeanName(name + ".bridge");
    adapter.setOutputChannel(bridgeToModuleChannel);
    adapter.setBeanName("inbound." + name);
    adapter.afterPropertiesSet();//w w  w  .  j av a2s. c  om
    addBinding(Binding.forConsumer(adapter, moduleInputChannel));
    GemFireRPCListener convertingBridge = new GemFireRPCListener(acceptedMediaTypes);
    convertingBridge.setOutputChannel(moduleInputChannel);
    convertingBridge.setBeanName(name + ".convert.bridge");
    convertingBridge.afterPropertiesSet();
    bridgeToModuleChannel.subscribe(convertingBridge);
    adapter.start();
}