Java Code Examples for org.springframework.integration.core.MessagingTemplate

The following examples show how to use org.springframework.integration.core.MessagingTemplate. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: CogStack-Pipeline   Source File: RemoteConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
@Qualifier("partitionHandler")
public MessageChannelPartitionHandler partitionHandler(
        @Qualifier("requestChannel") MessageChannel reqChannel,
        @Qualifier("aggregatedReplyChannel") PollableChannel repChannel) {
    MessageChannelPartitionHandler handler = new MessageChannelPartitionHandler();
    handler.setGridSize(gridSize);
    handler.setStepName("compositeSlaveStep");
    handler.setReplyChannel(repChannel);
    MessagingTemplate template = new MessagingTemplate();
    template.setDefaultChannel(reqChannel);
    template.setReceiveTimeout(partitionHandlerTimeout);
    handler.setMessagingOperations(template);
    return handler;
}
 
Example 2
Source Project: citrus-admin   Source File: ChannelAdapterConverter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Map<String, Class<?>> getOptionTypeMappings() {
    Map<String, Class<?>> mappings = super.getOptionTypeMappings();
    mappings.put("messagingTemplate", MessagingTemplate.class);
    mappings.put("channelResolver", DestinationResolver.class);
    return mappings;
}
 
Example 3
Source Project: batchers   Source File: EmployeeJobConfigMaster.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
@StepScope
public PartitionHandler taxCalculationPartitionHandler() {
    MessageChannelPartitionHandler messageChannelPartitionHandler = new MessageChannelPartitionHandler();
    messageChannelPartitionHandler.setGridSize(clusterConfig.getClusterSize() - MASTER_WITHOUT_TAX_CALCULATION_STEP);
    messageChannelPartitionHandler.setReplyChannel(replyChannel());
    messageChannelPartitionHandler.setStepName(EmployeeJobConfigSlave.TAX_CALCULATION_STEP);

    MessagingTemplate messagingGateway = new MessagingTemplate();
    messagingGateway.setReceiveTimeout(RECEIVE_TIMEOUT);
    messagingGateway.setDefaultChannel(outboundRequests());
    messageChannelPartitionHandler.setMessagingOperations(messagingGateway);

    return messageChannelPartitionHandler;
}
 
Example 4
@Bean
public MessagingTemplate messagingTemplate() {
	return new MessagingTemplate(directChannel());
}