Spring Integration Reference Manual

Mark Fisher

Marius Bogoevici

Iwein Fuld

Jonas Partner

Oleg Zhurakousky

Gary Russell

Dave Syer

Josh Long

2.0.0.RC2

© SpringSource Inc., 2010


Table of Contents

I. Overview of Spring Integration Framework
1. Spring Integration Overview
1.1. Background
1.2. Goals and Principles
1.3. Main Components
1.3.1. Message
1.3.2. Message Channel
1.3.3. Message Endpoint
1.4. Message Endpoints
1.4.1. Transformer
1.4.2. Filter
1.4.3. Router
1.4.4. Splitter
1.4.5. Aggregator
1.4.6. Service Activator
1.4.7. Channel Adapter
II. Core Messaging
2. Messaging Channels
2.1. Message Channels
2.1.1. The MessageChannel Interface
PollableChannel
SubscribableChannel
2.1.2. Message Channel Implementations
PublishSubscribeChannel
QueueChannel
PriorityChannel
RendezvousChannel
DirectChannel
ExecutorChannel
ThreadLocalChannel
2.1.3. Channel Interceptors
2.1.4. MessagingTemplate
2.1.5. Configuring Message Channels
DirectChannel Configuration
QueueChannel Configuration
PublishSubscribeChannel Configuration
ExecutorChannel
PriorityChannel Configuration
RendezvousChannel Configuration
ThreadLocalChannel Configuration
Channel Interceptor Configuration
Global Channel Interceptor Configuration
Wire Tap
2.2. Channel Adapter
2.2.1. The <inbound-channel-adapter> element
2.2.2. The <outbound-channel-adapter/> element
2.3. Messaging Bridge
2.3.1. Introduction
2.3.2. The <bridge> Element
3. Message Construction
3.1. Message
3.1.1. The Message Interface
3.1.2. Message Headers
3.1.3. Message Implementations
3.1.4. The MessageBuilder Helper Class
4. Message Routing
4.1. Router
4.1.1. Router Implementations
PayloadTypeRouter
HeaderValueRouter
RecipientListRouter
4.1.2. Namespace support for Router - <router> element
4.1.3. The @Router Annotation
4.1.4. Dynamic Routers
4.2. Filter
4.2.1. Introduction
4.2.2. Namespace support for Filter - <filter> Element
4.3. Splitter
4.3.1. Introduction
4.3.2. Programming model
4.3.3. Configuring a Splitter using XML
4.3.4. Configuring a Splitter with Annotations
4.4. Aggregator
4.4.1. Introduction
4.4.2. Functionality
4.4.3. Programming model
CorrelatingMessageHandler
ReleaseStrategy
CorrelationStrategy
4.4.4. Configuring an Aggregator with XML
4.4.5. Managing State in an Aggregator: MessageGroupStore
4.4.6. Configuring an Aggregator with Annotations
4.5. Resequencer
4.5.1. Introduction
4.5.2. Functionality
4.5.3. Configuring a Resequencer with XML
4.6. Message Handler Chain
4.6.1. Introduction
4.6.2. The <chain> Element
5. Message Transformation
5.1. Transformer
5.1.1. Introduction
5.1.2. Namespace support for Transformer - <transformer> Element
5.1.3. Annotation support for Transformer - @Transformer
5.1.4. Header Filter
5.2. Content Enricher
5.2.1. Introduction
5.2.2. Header Enricher
5.3. Claim Check
5.3.1. Introduction
Incoming Claim Check Transformer
Outgoing Claim Check Transformer
6. Messaging Endpoints
6.1. Message Endpoints
6.1.1. Message Handler
6.1.2. Event Driven Consumer
6.1.3. Polling Consumer
6.1.4. Namespace Support
6.1.5. Payload Type Conversion
6.1.6. Asynchronous polling
6.2. Inbound Messaging Gateways
6.2.1. GatewayProxyFactoryBean
6.2.2. Asynchronous Gateway
6.2.3. Gateway behavior when no response is coming
6.3. Service Activator
6.3.1. Introduction
6.3.2. The <service-activator/> Element
6.4. Delayer
6.4.1. Introduction
6.4.2. The <delayer> Element
6.5. Groovy support
6.5.1. Groovy configuration
6.5.2. Control Bus
7. System Management
7.1. JMX Support
7.1.1. Notification Listening Channel Adapter
7.1.2. Notification Publishing Channel Adapter
7.1.3. Attribute Polling Channel Adapter
7.1.4. Operation Invoking Channel Adapter
7.1.5. Operation Invoking outbound Gateway
7.1.6. MBean Exporter
MBean Features
7.2. Message History
7.2.1. Message History Configuration
III. Integration Adapters
8. Spring ApplicationEvent Support
8.1. Receiving Spring ApplicationEvents
8.2. Sending Spring ApplicationEvents
9. Feed Adapter
9.1. Introduction
9.2. Feed Inbound Channel Adapter
10. File Support
10.1. Introduction
10.2. Reading Files
10.3. Writing files
10.4. File Transformers
11. FTP/FTPS Adapters
11.1. Introduction
11.2. FTP Inbound Channel Adapter
11.3. FTPS Inbound Channel Adapter
11.4. FTP Outbound Channel Adapter
11.5. FTPS Outbound Channel Adapter
12. HTTP Support
12.1. Introduction
12.2. Http Inbound Gateway
12.3. Http Outbound Gateway
12.4. HTTP Namespace Support
12.5. HTTP Samples
12.5.1. Multipart HTTP request - RestTemplate (client) and Http Inbound Gateway (server)
13. HttpInvoker Support
13.1. Introduction
13.2. HttpInvoker Inbound Gateway
13.3. HttpInvoker Outbound Gateway
13.4. HttpInvoker Namespace Support
14. Mail Support
14.1. Mail-Sending Channel Adapter
14.2. Mail-Receiving Channel Adapter
14.3. Mail Namespace Support
15. TCP and UDP Support
15.1. Introduction
15.2. UDP Adapters
15.3. TCP Connection Factories
15.4. Tcp Connection Interceptors
15.5. TCP Adapters
15.6. TCP Gateways
15.7. TCP Message Correlation
15.7.1. Overview
15.7.2. Gateways
15.7.3. Collaborating Outbound and Inbound Channel Adapters
15.8. IP Configuration Attributes
16. JDBC Support
16.1. Inbound Channel Adapter
16.1.1. Polling and Transactions
16.2. Outbound Channel Adapter
16.3. Outbound Gateway
16.4. Message Store
16.4.1. Initializing the Database
16.4.2. Partitioning a Message Store
17. JMS Support
17.1. Inbound Channel Adapter
17.2. Message-Driven Channel Adapter
17.3. Outbound Channel Adapter
17.4. Inbound Gateway
17.5. Outbound Gateway
17.6. Message Conversion, Marshalling and Unmarshalling
17.7. JMS Backed Message Channels
17.8. JMS Samples
18. RMI Support
18.1. Introduction
18.2. Outbound RMI
18.3. Inbound RMI
18.4. RMI namespace support
19. SFTP Adapters
19.1. Introduction
19.2. SFTP Inbound Channel Adapter
19.3. SFTP Outbound Channel Adapter
20. Stream Support
20.1. Introduction
20.2. Reading from streams
20.3. Writing to streams
20.4. Stream namespace support
21. Twitter Adapter
21.1. Introduction
21.2. Twitter OAuth Configuration
21.3. Twitter Template
21.4. Twitter Inbound Adapters
21.4.1. Inbound Message Channel Adapter
21.4.2. Direct Inbound Message Channel Adapter
21.4.3. Mentions Inbound Message Channel Adapter
21.4.4. Search Inbound Message Channel Adapter
21.5. Twitter Outbound Adapter
21.5.1. Twitter Outbound Update Channel Adapter
21.5.2. Twitter Outbound Direct Message Channel Adapter
22. Web Services Support
22.1. Outbound Web Service Gateways
22.2. Inbound Web Service Gateways
22.3. Web Service Namespace Support
23. XML Support - Dealing with XML Payloads
23.1. Introduction
23.2. Transforming xml payloads
23.3. Namespace support for xml transformers
23.4. Splitting xml messages
23.5. Routing xml messages using XPath
23.6. Selecting xml messages using XPath
23.7. Transforming xml messages using XPath
23.8. XPath components namespace support
24. XMPP Support
24.1. Introduction
24.2. XMPP Connection
24.3. XMPP Messages
24.3.1. Inbound Message Channel Adapter
24.3.2. Outbound Message Channel Adapter
24.4. XMPP Presence
24.4.1. Inbound Presence Message Channel Adapter
24.4.2. Outbound Presence Message Channel Adapter
24.5. Appendices
IV. Appendices
25. Message Publishing
25.1. Message Publishing Configuration
25.1.1. Annotation-driven approach via @Publisher annotation
25.1.2. XML-based approach via <publishing-interceptor> element
25.1.3. Producing and publishing messages based on a scheduled trigger
26. Transaction Support
26.1. Understanding Transactions in Message flows
26.1.1. Poller Transaction Support
26.2. Transaction Boundaries
27. Security in Spring Integration
27.1. Introduction
27.2. Securing channels
A. Spring Integration Samples
A.1. Introduction
A.2. Where to get Samples
A.3. Samples structure
A.4. Samples
A.4.1. Loan Broker
A.4.2. The Cafe Sample
A.4.3. The XML Messaging Sample
B. Configuration
B.1. Introduction
B.2. Namespace Support
B.3. Configuring the Task Scheduler
B.4. Error Handling
B.5. Annotation Support
B.6. Message Mapping rules and conventions
B.6.1. Simple Scenarios
B.6.2. Complex Scenarios
C. Additional Resources
C.1. Spring Integration Home