java自学网(www.javazx.com)-java论坛,java电子书推荐:《Spring Integration Essentials》简称SI
( h9 ]( R0 h# C( r5 Djava电子书推荐理由:This book is intended for developers who are either already involved with enterprise integration or planning to venture into the domain. Basic knowledge of Java and Spring is expected. For newer users, this book can be used to understand an integration scenario, what the challenges are, and how Spring Integration can be used to solve it. Prior experience of Spring Integration is not expected as this book will walk you through all the code examples.适合初学者来学习spring integration 其实就是我们所说的esb框架与mule相似。
- ]1 o ]6 E: _ \
, ~6 _: R0 z, ?5 c! A/ G作者:Chandan Pandey0 Q! B# Y" L) ~6 H, d
出版社:Packt Publishing
& t4 {1 H3 ]. J, }5 |3 W. X) C) q% G
出版时间:2015-02-20
* O2 g" D( V4 s% a. `+ V
/ p% F5 B }( jjava电子书目录: Spring Integration Essentials
; P! N) y z" A" E Table of Contents
) q8 o8 J6 V' |% q( d6 Y Spring Integration Essentials
5 b8 u, R. k m0 a4 P Credits3 h, d! s0 ~1 X3 z
About the Author' A: Q1 d" S4 \) @0 `5 P1 }
Acknowledgments- c7 j1 g( V) l. L3 b2 P
About the Reviewers6 D2 C1 A1 z" Z
Support files, eBooks, discount offers, and more/ j% V* h1 R' S" [
Why subscribe?4 ]6 O$ K0 m% y, ?# H2 B# L
Free access for Packt account holders
; \+ @/ W* z+ G9 t* P# O( i6 } Preface
$ q, O4 R# i, z How enterprise integration challenges can be solved
2 B5 b* ~& T) W Who are the players?
! t$ r8 i" u, B5 X$ h Why Spring Integration?
* s5 j6 T5 g- q/ }6 E7 x ` What this book covers
+ p! c$ O5 g! V% Y ? What you need for this book/ h" ^9 E1 h- N6 v
Who this book is for" u M5 s4 N6 J
Conventions
: m" X' b5 n* ]7 F5 p Reader feedback4 I3 Z& ?' B r/ l: K5 A6 a
Customer support
6 D- [7 m0 f& | x, H4 ~2 o Downloading the example code* n. I3 `: `8 H1 t4 v5 i: y9 U
Errata
. i$ B) M% P+ U$ J7 F. k% h Piracy
4 d7 ~# w9 g+ n. R2 L( R9 [ Questions' s4 H* c1 M/ ?
1. Getting Started4 Q! r) J6 Q7 J+ r# O
Setting up STS
; U: g/ Y! O9 w, \) I. K& w6 T Creating your first project5 d+ S9 n b! g$ m4 v$ i
STS visual editor
3 ~" ^$ P; E# h/ T3 m0 p* m6 P Spring Integration Scala DSL
9 I& _# s* Z- O% S Summary9 T! n2 N! k1 j z& ~5 W1 X
2. Message Ingestion. h; j2 x' ^) H, ?
Working with message channels
7 {: ?6 k8 x2 P. u% g% l5 Y Channel types# |0 V9 f+ e M8 l2 @
Spring implementation of channels7 B! u0 l' U5 q# g
Selecting a channel/ r* k( H: Y. A6 P; R& a
Publish-subscribe channel
1 }! N% M% G* Y3 x% n( m6 k Queue channel
7 F% A+ {' d, l" h Priority channel3 r+ l5 w5 |: d7 W
Rendezvous channel
/ g2 [, o. I% m" c& y Direct channel
8 m" J D: F9 V0 \1 U6 T! C Executor channel
Z# l% H' C3 ?+ w U Scoped channel
2 g' T, k0 N5 i Datatype channel
& M' X! m7 r2 C) s1 T& t Error handling on channels. R1 X: u! Z, Z- o. g8 ]
Persisting and recovering channels$ S! p# a/ k& U) e
Channel interceptors
! h: ^! \0 I O! P& w+ K Summary( ?8 V2 x! A4 w/ B) q! ]! [1 B9 N
3. Message Processing5 b/ M" k8 u+ V2 R8 [- P
Message endpoints8 @8 x$ _9 [8 G- L" P# O2 m
Gateways$ L& B6 ~# ~" ~2 Z+ c
Synchronous gateways7 r3 u* ~/ e: A4 d8 q
Asynchronous gateways
0 p8 i& D) Z m Service activators' D _) D( A$ D$ ]
Delayers
- \8 {% V' p3 [, k. }5 E4 l1 b Transactions
. X1 {: d* \& o4 | Summary7 ~( \: o: K( H4 ]4 [, S
4. Message Transformers
& Y- d( l C7 h7 g% S9 d5 ] Introducing message transformers
/ @5 |6 D7 M# G, z+ ~8 |( r Working with XML payload/ e! }: t! E, T" W) g' _
The marshalling transformer
# ?9 |( d$ P! B& @3 Q The unmarshalling transformer
/ z0 [% n# U. z2 {* J# k XPath transformers! d' b' F# y1 g) U
Validating XML messages: \4 t. O9 w6 r. B& {1 q/ C8 f
Beyond default transformers- L+ p* a7 z0 `0 K6 ]
Content enrichers
. W Q9 l5 X/ L Header enrichers
; l# U6 X; B& ?+ Y. ] Payload enrichers+ F9 w$ v" ~9 [4 I2 z
Claim check
; k/ |$ s8 @# v8 y" ]+ T* U Incoming claim check transformer2 [% B: V8 M4 m9 ?% Q' p: |/ E
Outgoing claim check transformer2 C3 ?7 v2 _! ^9 M/ O0 |/ \
Summary
* K( Y5 C8 S3 j* u 5. Message Flow6 p1 O0 q# }3 }: K
Routers
$ @ r! t/ |: d9 M+ H3 A Payload-type router" E" s& A3 K7 e8 y) s$ E3 z6 g
Header value router
. H( B- ?7 E0 _6 f/ M" ` Recipient list router
2 _. C8 A0 K2 ^4 e6 J XPath router
6 N$ L% K* h( Y5 o! O, V! @: c# G Error message exception-type router5 D9 C; Y8 s: i( j1 H/ K
Default output channel* f# E, u U b3 A2 K7 H w; i
Using annotations" V8 E2 J% H1 t! F
Filters" w5 y1 ~! a9 _# Z" C" r
Using a Java class to act as a filter
% t& k$ D% f# b Configuring a filter as a message endpoint! F9 B4 Z' @! @/ n
Splitters
* |& m* G5 C$ w% k Aggregators3 \& p' D5 H7 `# J6 K
Correlation strategy
& [" `. M" |+ ]. S$ y3 y+ r Release strategy
( }! V) Y3 u5 ~- ~9 G! l Message store
8 m! ~/ s* v$ B, j. h& v! k Resequencers
% ?( _1 [/ g' r' S Chaining handlers
- @: r& L3 O l Summary
* Y3 W+ }3 Y! ~5 q0 e* l6 c 6. Integration with External Systems
! W; {- a: s9 }6 e Working with files) n0 k2 d& h5 i+ g5 b: k' I
Prerequisites
: z. b9 d# }, x5 A8 F1 o) W Reading files
7 Z" M+ @/ s2 w8 V+ X Behind the scenes5 t% H1 S4 I9 {' h' l5 r
Filters/ q8 z" U# H& ?
Preventing duplicates9 `! l% j9 g5 B# j
Concurrent access
8 Y$ f$ t$ E; Y @; ]# v- n- R, y Writing files' o* z* I7 U- ^! L* N
Naming the file
) v3 }0 A( y. L" K9 K" [9 s Target directory/ G- K0 a5 h- k3 D, O
Dealing with existing filenames( `% }2 s& V9 o I; y) x/ F( S
File transformers& t% V P5 K$ v# G
FTP/FTPS& b+ E/ h! O& |# v, g- O
Prerequisites. a, c% w- i% h- i/ I
Downloading files from the FTP server) E/ X5 b4 J4 y5 h
Incomplete files
8 t& j& ?4 \, I Uploading files to the FTP server0 c8 X5 |. @8 P1 O3 u+ O
Avoiding partially written files$ P/ o+ g' p. F/ B' n
FTP outbound gateway& x$ A( a( i' n: V/ n
FTPS support
' p0 @1 c c% R! i' ~ Social integration
' t4 c0 f, v3 x/ a/ M, U Prerequisites' T+ j. e8 @$ K0 U0 Y
Receiving tweets
$ s) H6 }" @4 v6 D Sending tweets
, ?* S" P! ~& p$ h" `1 o+ B& V Twitter search outbound gateway) J) E( A! y6 ^- h
Enterprise messaging4 l) \& Y" J2 e1 a: b7 J6 L% U4 {
Prerequisites
* B9 o$ T6 T. I% c Receiving messages – the inbound adapter
; O: @2 ]$ V+ c The polling adapter
, F. `! a- @, \% b The event-driven adapter* J5 O7 s5 S9 d4 E6 ?, `
Sending messages – the outbound adapter3 Y4 h* z1 @5 T; t
Gateway* D: {) G" A2 i5 y. p
The inbound gateway2 T3 }4 _$ B, p+ q
The outbound gateway% K7 t1 `, q4 @8 \9 B" j
HTTP
7 ~; `* H/ V* g Prerequisites& K! n1 z F% o% C0 F
The HTTP inbound gateway/ a# V7 e/ ]6 [* Y# ]1 u6 ~7 o9 @
The HTTP outbound gateway
; n8 J0 L3 c$ m7 _8 I- { Web services' R& s2 c7 ]& I5 M" u9 f
Prerequisites
; m9 u. B0 s2 I8 F% F& e/ u The inbound gateway
/ E5 | \4 L! x/ N$ ?' y The outbound gateway# E! z3 H' Q" O/ Q# p4 N8 J) U
Database SQL
* ~( F9 c2 G- C7 g3 t( ^ Prerequisites) h: p: Q7 a3 g# D1 \
Datasource6 L% a8 V! ?7 }
Reading from the database – the inbound adapter( z/ C& k/ x `; C( a( G
Transaction support! B; \! y/ ^; X* V8 O, Q A
Writing to the database – the outbound adapter1 K3 s) k& q& A. W. B2 o
Inbound and outbound gateways
0 H1 E* w) d6 ~. T# K7 j5 P Stream processing
5 o: }, P0 P7 m6 c) V Prerequisites
: k6 F( X, K1 d+ B! j Reading from a stream g3 O8 }2 @! V6 F9 `7 O: g Z
Writing to a stream
' w: Z) K) x. b, t: } Summary+ c9 F5 t, K ~" u
7. Integration with Spring Batch, V- I1 [" s% `
Spring Batch1 J# |9 S" h5 f' n8 U# q% X
Prerequisites( ?* R) C$ J* T$ k
Defining a Spring Batch job* ]; ~' `/ c( G
The Spring Batch job language0 c2 U2 D7 z3 i& v! `) I& W
ItemReader
' Q3 |. H: v0 q% g0 k: z ItemWriter
: S( ^. W8 i5 M, T4 n! y Spring Batch and Spring Integration
/ ^# X, Z/ _0 Q Launching the job- _2 o0 Y9 @ \ Z" j, R. w
Tracking the status of a batch job: l5 Z' H9 x! |+ D, E5 w! F: m
The other way round. f* C& p! J# ^6 k3 X6 t- w
Summary
, e9 s% D [5 j 8. Testing Support
# y; M# `* F& S& N4 H4 g Prerequisite
! R! O3 f5 `8 E$ _1 @1 }: c Testing messages
2 ^( Q2 v; b# h2 K. X! e2 n Testing headers; l0 X6 V# L% g& v* w. o2 j
Handling errors
- a3 p' t% `6 O- K7 e) N- o Testing filters# V/ i& F$ x% G+ ~, h. M) r
Splitter test
9 p/ ?2 y" G0 O Summary
. n$ D) r+ i# S$ Q. m3 f& B 9. Monitoring, Management, and Scaling Up
6 H' [) n& |: T4 B* l% ` Monitoring and management! r3 t& `- h, U5 h# I
JMX support# Y% R9 i2 Q9 T# i1 M5 _2 c5 D5 i
Prerequisites
/ [& Z5 k% g7 s* M0 I- M The notification listening channel adapter
{7 o3 t0 T$ t* u# c9 N The notification publishing channel adapter
- ?7 Y3 o" B- G3 n% Y+ T/ O5 W The attribute polling channel adapter
! O- _' w: C( R) {0 s The tree polling channel adapter
" N3 l5 y% g- N The operation invoking channel adapter- ~) l; B; L l, A$ h1 `( B, x
The operation invoking outbound gateway
" G1 R" g8 C5 p2 T G& l The MBean exporter) b- ]) S& F* q& q ?& i
Tracking the message; a% B5 j" W$ d8 m5 w
Wire tap- X* O5 b* a/ U
Control bus( j5 |% F8 K) ]- W
Scaling up) Z) D& X9 r# s0 S' G
Threading
2 ~4 q: z; {. N0 D9 H9 f) t6 o( u Scaling the state' q$ M! T" P8 w( m( q1 s: T
Message store( ]/ g1 `4 ]$ a1 z5 q( n+ O4 o3 a8 B. _' w) B
Claim check
8 c" P9 x, [& D+ Y! e Summary
O& U8 r& O- t/ V 10. An End-to-End Example
- O3 w Y! l, n7 M! c Prerequisites
' S- u5 n0 F1 E7 v) L. K! ?8 S Setting up& [7 H. s8 c k5 j
Ingesting data
' T n+ Q0 I! n$ t: } Ingesting data from the RSS feed
. M( @$ H, ?$ _% h, p7 w, q' r Ingesting data from an FTP server; Q0 y# w# E/ z0 i! s y
Filtering the data
9 H7 W& K' d7 b- X" T The aggregator& N9 x5 B" W9 V9 V
The correlation bean
3 _- a# h% [* H0 w1 k! _ The completion bean
/ p) K8 F4 ~4 y5 X$ o The aggregator bean) Y0 o) {# V5 I) ?$ P& h) ~
The splitter
9 L" I9 p! {/ |( `0 v0 i Transformation1 b% L# \! D3 m% \* D* o `* u7 {
The DB transformer' {+ V I9 Q0 `1 `+ p
The JMS transformer
; o. o* z9 q3 S: l. c The mail transformer! y6 N4 }1 p- F1 w
Router6 j- Q' z3 a8 k; ?: b; s
Integration
: e( ?9 b4 [8 ^# \3 h Database integration
; D$ d" t) t! \* `2 [ Prerequisites
5 D$ J) ]' }: g( O B8 `2 w The gateway3 M I8 }8 z+ A/ N V# l
The service activator$ D+ N( ?- T2 {& Z6 g0 B+ g% x
Gateways for updating and reading the feeds V; B" |: p4 x: d: Y \7 s. P
Sending a mail4 x, F! l1 e& S+ t1 Q `$ i
Putting messages on to the JMS queue6 V+ X. Z2 `+ z5 t
Exporting as an MBean
# }# A: [- u+ d* U c8 a Summary3 Z$ V+ h- C- V1 j, ?5 n
Index " U* V% ]8 r( Y7 G$ b8 }5 ?/ k' Z
1 C0 y9 O% P3 a O0 j$ @
$ p+ B& ?' G3 E0 \ c |