Đăng nhập
Hoặc tiếp tục với email
Nhớ mật khẩu
Đang tải... (xem toàn văn)
Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
THÔNG TIN TÀI LIỆU
Cấu trúc
SpringIntegrationInAction
brief contents
contents
foreword
preface
acknowledgments
about this book
Roadmap
Who should read this book?
Code conventions and downloads
Author Online
about the authors
about the cover illustration
Part 1 Background
1 Introduction to Spring Integration
1.1 Spring Integration’s architecture
1.2 Spring Integration’s support for enterprise integration patterns
1.2.1 Messages
1.2.2 Message Channels
1.2.3 Message endpoints
1.3 Enterprise integration patterns meet Inversion of Control
1.3.1 Dependency injection
1.3.2 Method invocation
1.4 Say hello to Spring Integration
1.5 Summary
2 Enterprise integration fundamentals
2.1 Loose coupling and event-driven architecture
2.1.1 Why should you care about loose coupling?
2.1.2 Type-level coupling
2.1.3 Loosening type-level coupling with dependency injection
2.1.4 System-level coupling
2.1.5 Event-driven architecture
2.2 Synchronous and asynchronous communication
2.2.1 What’s the difference?
2.2.2 Where does Spring Integration fit in?
2.3 Comparing enterprise integration styles
2.3.1 Integrating applications by transferring files
2.3.2 Interacting through a shared database
2.3.3 Exposing a remote API through Remote Procedure Calls
2.3.4 Exchanging messages
2.4 Summary
Part 2 Messaging
3 Messages and channels
3.1 Introducing Spring Integration messages
3.1.1 What’s in a message?
3.1.2 How it’s done in Spring Integration
3.2 Introducing Spring Integration channels
3.2.1 Using channels to move messages
3.2.2 I’ll let you know when I’ve got something!
3.2.3 Do you have any messages for me?
3.2.4 The right channel for the job
3.2.5 A channel selection example
3.3 Channel collaborators
3.3.1 MessageDispatcher
3.3.2 ChannelInterceptor
3.4 Summary
4 Message Endpoints
4.1 What can you expect of an endpoint?
4.1.1 To poll or not to poll?
4.1.2 Inbound endpoints
4.1.3 Outbound endpoints
4.1.4 Unidirectional and bidirectional endpoints
4.2 Transaction boundaries around endpoints
4.2.1 Why sharing isn’t always a good thing
4.2.2 What are transactions, and can we get by without them?
4.3 Under the hood
4.3.1 Endpoint parsing
4.3.2 Endpoint instantiation
4.4 Summary
5 Getting down to business
5.1 Domain-driven transformation
5.1.1 Marshalling flight information
5.1.2 Using the simplest possible data representation
5.1.3 Wiring the components together
5.1.4 Testing the transformer
5.1.5 Content enricher
5.1.6 Header enricher
5.2 Message-driven services
5.2.1 The Service Activator pattern
5.2.2 The Return Address pattern
5.3 Message publishing interceptors
5.4 Domain-driven Messaging Gateways
5.5 Chaining endpoints
5.6 Summary
6 Go beyond sequential processing: routing and filtering
6.1 Do you want to get this message?
6.1.1 Filtering out messages
6.1.2 Using filters for selective processing
6.2 Whose message is this, anyway?
6.2.1 Configuring routers
6.2.2 Routers provided by the framework
6.2.3 Routers with multiple destinations
6.3 Under the hood
6.3.1 The message filter API
6.3.2 The message router API
6.4 Summary
7 Splitting and aggregating messages
7.1 Introducing correlation
7.1.1 A real-life example
7.1.2 Correlating messages
7.2 Splitting, aggregating, and resequencing
7.2.1 The art of dividing: the splitter
7.2.2 How to get the big picture: the aggregator
7.2.3 Doing things in the right order: the resequencer
7.3 Useful patterns
7.3.1 Grouping messages based on timing
7.3.2 Scatter-gather
7.4 Under the hood
7.4.1 Extension points of the CorrelatingMessageHandler
7.4.2 How do Resequencer and Aggregator do it?
7.5 Summary
Part 3 Integrating systems
8 Handling messages with XML payloads
8.1 XML messaging
8.1.1 Marshalling LegQuoteCommand into XML
8.1.2 Enriching the leg quote using XSLT
8.1.3 XPath support
8.1.4 Splitting hotel, car rental, and flight quotes
8.1.5 Routing messages based on their XML payloads
8.1.6 Validating XML messages
8.2 Under the hood
8.2.1 Supported payload types and return type matching
8.3 Summary
9 Spring Integration and the Java Message Service
9.1 The relationship between Spring Integration and JMS
9.1.1 Mapping between JMS and Spring Integration messages
9.1.2 Comparing JMS destinations and Spring Integration message channels
9.2 JMS support in the Spring Framework
9.3 Asynchronous JMS message reception with Spring
9.3.1 Why go asynchronous?
9.3.2 Spring’s MessageListener container
9.3.3 Message-driven POJOs with Spring
9.4 Sending JMS messages from a Spring Integration application
9.5 Receiving JMS messages in a Spring Integration application
9.6 Request-reply messaging
9.6.1 The outbound gateway
9.6.2 The inbound gateway
9.7 Messaging between multiple Spring Integration runtimes
9.8 Managing transactions with JMS channel adapters and gateways
9.8.1 JMS transaction basics
9.8.2 A note about distributed transactions
9.9 Summary
10 Email-based integration
10.1 Sending email
10.1.1 The outbound channel adapter
10.1.2 Advanced configuration options
10.1.3 Transforming outbound messages
10.2 Receiving email
10.2.1 Polling for emails
10.2.2 Event-driven email reception
10.2.3 Transforming inbound messages
10.3 Summary
11 Filesystem integration
11.1 Can you be friends with the filesystem?
11.1.1 A file-based collaborative trip diary editor
11.2 Writing files
11.2.1 Configuring the file-writing endpoint
11.2.2 Writing increments from the collaborative editor
11.3 Reading files
11.3.1 A File in Java isn’t a file on your disk
11.3.2 Configuring the file-reading endpoint
11.3.3 From the example: picking up incremental updates
11.4 Handling file-based messages
11.4.1 Transforming files into objects
11.4.2 Common scenarios when dealing with files
11.4.3 Configuring file transformers
11.4.4 Applying incoming changes to the collaborative editor
11.5 Under the hood
11.5.1 FileReadingMessageSource
11.6 Summary
12 Spring Integration and web services
12.1 XML web services with Spring WS
12.1.1 Exposing a Spring WS–based inbound gateway
12.1.2 Calling a web service with the outbound gateway
12.1.3 Marshalling support
12.2 Simple HTTP endpoints
12.2.1 Processing HTTP inbound requests
12.2.2 Inbound-only messages using inbound-channel-adapter
12.2.3 Outbound HTTP requests
12.2.4 Outbound channel adapter
12.3 Summary
13 Chatting and tweeting
13.1 XMPP
13.1.1 Sending XMPP messages
13.1.2 Receiving XMPP messages
13.1.3 Sending and receiving presence status updates
13.2 Twitter
13.2.1 Receiving messages from a Twitter search
13.2.2 OAuth configuration for the Twitter template
13.2.3 Receiving messages from your Twitter timeline
13.2.4 Sending messages to update your Twitter status
13.2.5 Receiving messages from Twitter retweets, replies, and mentions
13.2.6 Sending and receiving direct messages via Twitter
13.3 Future directions
13.4 Summary
Part 4 Advanced topics
14 Monitoring and management
14.1 Message history
14.2 Wire Tap
14.3 JMX support in Spring Integration
14.3.1 Monitoring channels and endpoints with JMX
14.3.2 Integration using JMX adapters
14.4 Control Bus
14.4.1 Spring’s support for management annotations
14.4.2 Using SpEL for control messages
14.4.3 Using Groovy for control messages
14.5 Under the hood
14.6 Summary
15 Managing scheduling and concurrency
15.1 Controlling timed events
15.1.1 Pollers and their configuration
15.1.2 Controlling the polling frequency
15.1.3 Scheduling jobs at precise times
15.1.4 Advanced configuration options
15.1.5 Publishing messages according to a schedule
15.2 Managing concurrency
15.2.1 Breaking down the thread
15.2.2 Configuring the infrastructure
15.3 Under the hood
15.3.1 The TaskExecutor API
15.3.2 The TaskScheduler API
15.4 Summary
16 Batch applications and enterprise integration
16.1 Introducing batch jobs
16.1.1 Online or batch, that’s the question
16.1.2 Batch processing: what’s it good for?
16.1.3 Batch by example
16.2 Introducing Spring Batch
16.2.1 A batch job in five minutes
16.2.2 Getting the job done
16.3 Integrating Spring Batch and Spring Integration
16.3.1 Launching batch jobs through messages
16.3.2 Providing feedback with informational messages
16.3.3 Externalizing batch process execution
16.4 Summary
17 Scaling messaging applications with OSGi
17.1 The OSGi module system
17.1.1 The bundle lifecycle in an OSGi environment
17.2 Accessing the Service Registry through Gemini Blueprint
17.3 Messaging between bundles
17.3.1 Reasons to combine OSGi with messaging
17.3.2 Publish-subscribe messaging between bundles
17.3.3 Point-to-point messaging and sharing the load
17.3.4 Using gateways and service activators to avoid Spring Integration dependencies
17.4 Summary
18 Testing
18.1 Matching messages with the Spring Integration testing framework
18.1.1 Unwrapping payloads
18.1.2 Expectations on headers
18.2 Mocking services out of integration tests
18.3 Testing an asynchronous system
18.3.1 Can’t we wait for the message to come out the other end?
18.3.2 Avoiding the wicked ways of debugging
18.3.3 Injecting latches into endpoints
18.3.4 Structuring the configuration to facilitate testing
18.3.5 How do I prove my code thread safe?
18.4 Summary
index
Symbols
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
U
V
W
X
BackCover
Nội dung
Ngày đăng: 11/07/2018, 16:03
TỪ KHÓA LIÊN QUAN
TÀI LIỆU CÙNG NGƯỜI DÙNG
TÀI LIỆU LIÊN QUAN