Skip to content

Commit 9fa9d1b

Browse files
garyrussellartembilan
authored andcommitted
Add Multi-Page HTML Reference
- to avoid having to load the whole document - provide a link to the single page version for browser search * Fix cross-document links. Links need to be qualified with the containing file name for the multi-page html doc.
1 parent d7fa609 commit 9fa9d1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1112
-1022
lines changed

build.gradle

+48-21
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ buildscript {
66
dependencies {
77
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
88
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
9+
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.6"
910
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
1011
}
1112
}
@@ -819,6 +820,12 @@ project("spring-integration-bom") {
819820
}
820821
}
821822

823+
apply plugin: "org.asciidoctor.convert"
824+
825+
asciidoctorj {
826+
version = '1.5.5'
827+
}
828+
822829
configurations {
823830
docs
824831
}
@@ -836,33 +843,52 @@ task prepareAsciidocBuild(type: Sync) {
836843
into "$buildDir/asciidoc"
837844
}
838845

839-
asciidoctor {
840-
dependsOn 'prepareAsciidocBuild'
846+
task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask) {
847+
dependsOn prepareAsciidocBuild
848+
backends 'pdf'
841849
sourceDir "$buildDir/asciidoc"
842850
sources {
843-
include 'index.adoc'
851+
include 'index-single.adoc'
844852
}
853+
options doctype: 'book', eruby: 'erubis'
854+
logDocuments = true
855+
attributes 'icons': 'font',
856+
'sectanchors': '',
857+
'sectnums': '',
858+
'toc': '',
859+
'source-highlighter' : 'coderay',
860+
revnumber: project.version
861+
}
862+
863+
asciidoctor {
864+
dependsOn makePDF
865+
backends 'html5'
866+
sourceDir "$buildDir/asciidoc"
845867
resources {
846868
from(sourceDir) {
847-
include 'images/*', 'css/*', 'js/**'
869+
include 'images/*', 'css/**', 'js/**'
848870
}
849871
}
850-
backends = ['html5', 'pdf']
851872
options doctype: 'book', eruby: 'erubis'
852-
attributes 'icons': 'font',
853-
'idprefix': '',
854-
'idseparator': '-',
855-
docinfo: 'shared',
856-
sectanchors: '',
857-
sectnums: '',
858-
stylesdir: 'css/',
859-
stylesheet: 'spring.css',
860-
'linkcss': true,
861-
'source-highlighter=highlight.js',
862-
'highlightjsdir=js/highlight',
863-
'highlightjs-theme=atom-one-dark-reasonable',
864-
'project-version': project.version,
865-
'allow-uri-read': ''
873+
logDocuments = true
874+
attributes 'docinfo': 'shared',
875+
// use provided stylesheet
876+
stylesdir: "css/",
877+
stylesheet: 'spring.css',
878+
'linkcss': true,
879+
'icons': 'font',
880+
'sectanchors': '',
881+
// use provided highlighter
882+
'source-highlighter=highlight.js',
883+
'highlightjsdir=js/highlight',
884+
'highlightjs-theme=atom-one-dark-reasonable',
885+
'idprefix': '',
886+
'idseparator': '-',
887+
'spring-version': project.version,
888+
'allow-uri-read': '',
889+
'toc': 'left',
890+
'toclevbels': '4',
891+
revnumber: project.version
866892
}
867893

868894
task reference(dependsOn: asciidoctor) {
@@ -953,8 +979,9 @@ task docsZip(type: Zip, dependsOn: reference) {
953979
}
954980

955981
from ('build/asciidoc/pdf') {
956-
include 'index.pdf'
957-
into 'reference/pdf'
982+
include "index-single.pdf"
983+
rename 'index-single.pdf', 'spring-integration-reference.pdf'
984+
into 'reference/pdf'
958985
}
959986
}
960987

src/reference/asciidoc/aggregator.adoc

+7-7
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ It is done only if the message group release result is not a message or collecti
108108
In that case a target `MessageGroupProcessor` is responsible for the `MessageBuilder.popSequenceDetails()` call while building those messages.
109109
This functionality can be controlled by a new `popSequence` `boolean` property, so the `MessageBuilder.popSequenceDetails()` can be disabled in some scenarios when correlation details have not been populated by the standard splitter.
110110
This property, essentially, undoes what has been done by the nearest upstream `applySequence = true` in the `AbstractMessageSplitter`.
111-
See <<splitter>> for more information.
111+
See <<./splitter.adoc#splitter,Splitter>> for more information.
112112

113113
[[agg-message-collection]]
114114
IMPORTANT: The `SimpleMessageGroup.getMessages()` method returns an `unmodifiableCollection`.
@@ -223,7 +223,7 @@ The 4.3 release changed the default `Collection` for messages in a `SimpleMessag
223223
This was expensive when removing individual messages from large groups (an O(n) linear scan was required).
224224
Although the hash set is generally much faster to remove, it can be expensive for large messages, because the hash has to be calculated on both inserts and removes.
225225
If you have messages that are expensive to hash, consider using some other collection type.
226-
As discussed in <<message-group-factory>>, a `SimpleMessageGroupFactory` is provided so that you can select the `Collection` that best suits your needs.
226+
As discussed in <<./message-store.adoc#message-group-factory,Using `MessageGroupFactory`>>, a `SimpleMessageGroupFactory` is provided so that you can select the `Collection` that best suits your needs.
227227
You can also provide your own factory implementation to create some other `Collection<Message<?>>`.
228228

229229
The following example shows how to configure an aggregator with the previous implementation and a `SimpleSequenceSizeReleaseStrategy`:
@@ -324,7 +324,7 @@ Of course, the first solution above does not apply in this case.
324324
[[aggregator-java-dsl]]
325325
==== Configuring an Aggregator in Java DSL
326326
327-
See <<java-dsl-aggregators>> for how to configure an aggregator in Java DSL.
327+
See <<./dsl.adoc#java-dsl-aggregators,Aggregators and Resequencers>> for how to configure an aggregator in Java DSL.
328328
329329
[[aggregator-xml]]
330330
===== Configuring an Aggregator with XML
@@ -399,7 +399,7 @@ Optional.
399399
<6> A reference to a `MessageGroupStore` used to store groups of messages under their correlation key until they are complete.
400400
Optional.
401401
By default, it is a volatile in-memory store.
402-
See <<message-store>> for more information.
402+
See <<./message-store.adoc#message-store,Message Store>> for more information.
403403
<7> The order of this aggregator when more than one handle is subscribed to the same `DirectChannel` (use for load-balancing purposes).
404404
Optional.
405405
<8> Indicates that expired messages should be aggregated and sent to the 'output-channel' or 'replyChannel' once their containing `MessageGroup` is expired (see https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStore.html#expireMessageGroups-long[`MessageGroupStore.expireMessageGroups(long)`]).
@@ -457,7 +457,7 @@ Note that the actual time to expire an empty group is also affected by the reape
457457
It used to obtain a `Lock` based on the `groupId` for concurrent operations on the `MessageGroup`.
458458
By default, an internal `DefaultLockRegistry` is used.
459459
Use of a distributed `LockRegistry`, such as the `ZookeeperLockRegistry`, ensures only one instance of the aggregator can operate on a group concurrently.
460-
See <<redis-lock-registry>>, <<gemfire-lock-registry>>, and <<zk-lock-registry>> for more information.
460+
See <<./redis.adoc#redis-lock-registry,Redis Lock Registry>>, <<./gemfire.adoc#gemfire-lock-registry,Gemfire Lock Registry>>, and <<./zookeeper.adoc#zk-lock-registry,Zookeeper Lock Registry>> for more information.
461461
<21> A timeout (in milliseconds) to force the `MessageGroup` complete when the `ReleaseStrategy` does not release the group when the current message arrives.
462462
This attribute provides a built-in time-based release strategy for the aggregator when there is a need to emit a partial result (or discard the group) if a new message does not arrive for the `MessageGroup` within the timeout.
463463
When a new message arrives at the aggregator, any existing `ScheduledFuture<?>` for its `MessageGroup` is canceled.
@@ -750,7 +750,7 @@ public MessageHandler aggregator(MessageGroupStore jdbcMessageGroupStore) {
750750
----
751751
====
752752
753-
See <<aggregator-api>> and <<annotations_on_beans>> for more information.
753+
See <<aggregator-api>> and <<./configuration.adoc#annotations_on_beans,Annotations on `@Bean` Methods>> for more information.
754754
755755
NOTE: Starting with version 4.2, the `AggregatorFactoryBean` is available to simplify Java configuration for the `AggregatingMessageHandler`.
756756
@@ -863,5 +863,5 @@ Messages with the same correlation key are stored in the same message group.
863863
Some `MessageStore` implementations allow using the same physical resources, by partitioning the data.
864864
For example, the `JdbcMessageStore` has a `region` property, and the `MongoDbMessageStore` has a `collectionName` property.
865865
866-
For more information about the `MessageStore` interface and its implementations, see <<message-store>>.
866+
For more information about the `MessageStore` interface and its implementations, see <<./message-store.adoc#message-store,Message Store>>.
867867
=====

src/reference/asciidoc/amqp.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ The default `BatchingStrategy` is the `SimpleBatchingStrategy`, but this can be
294294
==== Overview
295295

296296
Version 5.0.1 introduced a polled channel adapter, letting you fetch individual messages on demand -- for example, with a `MessageSourcePollingTemplate` or a poller.
297-
See <<deferred-acks-message-source>> for more information.
297+
See <<./polling-consumer.adoc#deferred-acks-message-source,Deferred Acknowledgment Pollable Message Source>> for more information.
298298

299299
It does not currently support XML configuration.
300300

@@ -1036,7 +1036,7 @@ When `true` (the default), the connection is established (if it does not already
10361036
it) when the first message is sent.
10371037
====
10381038

1039-
See also <<async-service-activator>> for more information.
1039+
See also <<./service-activator.adoc#async-service-activator,Asynchronous Service Activator>> for more information.
10401040

10411041
[IMPORTANT]
10421042
.RabbitTemplate
@@ -1492,7 +1492,7 @@ This is because the template "`borrows`" a channel from the cache for each send
14921492
One solution is to start a transaction before the splitter, but transactions are expensive in RabbitMQ and can reduce performance several hundred fold.
14931493

14941494
To solve this problem in a more efficient manner, starting with version 5.1, Spring Integration provides the `BoundRabbitChannelAdvice` which is a `HandleMessageAdvice`.
1495-
See <<handle-message-advice>>.
1495+
See <<./handler-advice.adoc#handle-message-advice,Handling Message Advice>>.
14961496
When applied before the splitter, it ensures that all downstream operations are performed on the same channel and, optionally, can wait until publisher confirmations for all sent messages are received (if the connection factory is configured for confirmations).
14971497
The following example shows how to use `BoundRabbitChannelAdvice`:
14981498

src/reference/asciidoc/chain.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ In this case, it is 'somethingChain$child#1'.
121121
Note, this transformer is not registered as a bean within the application context, so it does not get a `beanName`.
122122
However its `componentName` has a value that is useful for logging and other purposes.
123123

124-
The `id` attribute for `<chain>` elements lets them be eligible for <<jmx-mbean-exporter,JMX export>>, and they are trackable in the <<message-history,message history>>.
124+
The `id` attribute for `<chain>` elements lets them be eligible for <<./jmx.adoc#jmx-mbean-exporter,,JMX export>>, and they are trackable in the <<./message-history.adoc#message-history,,message history>>.
125125
You can access them from the `BeanFactory` by using the appropriate bean name, as discussed earlier.
126126

127127
TIP: It is useful to provide an explicit `id` attribute on `<chain>` elements to simplify the identification of sub-components in logs and to provide access to them from the `BeanFactory` etc.

src/reference/asciidoc/changes-1.0-2.0.adoc

+17-17
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This guide includes many samples.
1818
===== Conversion Service and Converter
1919

2020
You can now benefit from the conversion service support provided with Spring while configuring many Spring Integration components, such as a https://www.enterpriseintegrationpatterns.com/DatatypeChannel.html[Datatype channel].
21-
See <<channel-implementations>> and <<service-activator>>.
21+
See <<./channel.adoc#channel-implementations,Message Channel Implementations>> and <<./service-activator.adoc#service-activator,Service Activator>>.
2222
Also, the SpEL support mentioned in the previous point also relies upon the conversion service.
2323
Therefore, you can register converters once and take advantage of them anywhere you use SpEL expressions.
2424

@@ -30,14 +30,14 @@ Spring Integration (which uses a lot of scheduling) now builds upon these.
3030
In fact, Spring Integration 1.0 had originally defined some of the components (such as `CronTrigger`) that have now been migrated into Spring 3.0's core API.
3131
Now you can benefit from reusing the same components within the entire application context (not just Spring Integration configuration).
3232
We also greatly simplified configuration of Spring Integration pollers by providing attributes for directly configuring rates, delays, cron expressions, and trigger references.
33-
See <<channel-adapter>> for sample configurations.
33+
See <<./channel-adapter.adoc#channel-adapter,Channel Adapter>> for sample configurations.
3434

3535
[[rest-support]]
3636
===== `RestTemplate` and `HttpMessageConverter`
3737

3838
Our outbound HTTP adapters now delegate to Spring's `RestTemplate` for executing the HTTP request and handling its response.
3939
This also means that you can reuse any custom `HttpMessageConverter` implementations.
40-
See <<http-outbound>> for more details.
40+
See <<./http.adoc#http-outbound,HTTP Outbound Components>> for more details.
4141

4242
[[new-eip]]
4343
==== Enterprise Integration Pattern Additions
@@ -48,30 +48,30 @@ Also in 2.0, we have added support for even more of the patterns described in Ho
4848
===== Message History
4949

5050
We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageHistory.html[message history] pattern, letting you keep track of all traversed components, including the name of each channel and endpoint as well as the timestamp of that traversal.
51-
See <<message-history>> for more details.
51+
See <<./message-history.adoc#message-history,Message History>> for more details.
5252

5353
[[new-message-store]]
5454
===== Message Store
5555

5656
We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageStore.html[message store] pattern.
5757
The message store provides a strategy for persisting messages on behalf of any process whose scope extends beyond a single transaction, such as the aggregator and the resequencer.
5858
Many sections of this guide include samples of how to use a message store, as it affects several areas of Spring Integration.
59-
See <<message-store>>, <<claim-check>>, <<channel>>, <<aggregator>>, <<jdbc>>`", and <<resequencer>> for more details.
59+
See <<./message-store.adoc#message-store,Message Store>>, <<./claim-check.adoc#claim-check,Claim Check>>, <<./channel.adoc#channel,Message Channels>>, <<./aggregator.adoc#aggregator,Aggregator>>, <<./jdbc.adoc#jdbc,JDBC Support>>`", and <<./resequencer.adoc#resequencer,Resequencer>> for more details.
6060

6161
[[new-claim-check]]
6262
===== Claim Check
6363

6464
We have added an implementation of the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[claim check] pattern.
6565
The idea behind the claim check pattern is that you can exchange a message payload for a "`claim ticket`".
6666
This lets you reduce bandwidth and avoid potential security issues when sending messages across channels.
67-
See <<claim-check>> for more details.
67+
See <<./claim-check.adoc#claim-check,Claim Check>> for more details.
6868

6969
[[new-control-bus]]
7070
===== Control Bus
7171

7272
We have provided implementations of the https://www.enterpriseintegrationpatterns.com/ControlBus.html[control bus] pattern, which lets you use messaging to manage and monitor endpoints and channels.
7373
The implementations include both a SpEL-based approach and one that runs Groovy scripts.
74-
See <<control-bus>> and <<groovy-control-bus>> for more details.
74+
See <<./control-bus.adoc#control-bus,Control Bus>> and <<./groovy.adoc#groovy-control-bus,Control Bus>> for more details.
7575

7676
[[new-adapters]]
7777
==== New Channel Adapters and Gateways
@@ -82,7 +82,7 @@ We have added several new channel adapters and messaging gateways in Spring Inte
8282
===== TCP and UDP Adapters
8383

8484
We have added channel adapters for receiving and sending messages over the TCP and UDP internet protocols.
85-
See <<ip>> for more details.
85+
See <<./ip.adoc#ip,TCP and UDP Support>> for more details.
8686
See also the following blog: https://spring.io/blog/2010/03/29/using-udp-and-tcp-adapters-in-spring-integration-2-0-m3/["`Using UDP and TCP Adapters in Spring Integration 2.0 M3`"].
8787

8888
[[new-twitter]]
@@ -96,25 +96,25 @@ See https://github.com/spring-projects/spring-integration-extensions/tree/master
9696
===== XMPP Adapters
9797

9898
The new XMPP adapters support both chat messages and presence events.
99-
See <<xmpp>> for more details.
99+
See <<./xmpp.adoc#xmpp,XMPP Support>> for more details.
100100

101101
[[new-ftp]]
102102
===== FTP and FTPS Adapters
103103

104104
Inbound and outbound file transfer support over FTP and FTPS is now available.
105-
See <<ftp>> for more details.
105+
See <<./ftp.adoc#ftp,FTP/FTPS Adapters>> for more details.
106106

107107
[[new-sftp]]
108108
===== SFTP Adapters
109109

110110
Inbound and outbound file transfer support over SFTP is now available.
111-
See <<sftp>> for more details.
111+
See <<./sftp.adoc#sftp,SFTP Adapters>> for more details.
112112

113113
[[new-feed]]
114114
===== Feed Adapters
115115

116116
We have also added channel adapters for receiving news feeds (ATOM and RSS).
117-
See <<feed>> for more details.
117+
See <<./feed.adoc#feed,Feed Adapter>> for more details.
118118

119119
[[new-other]]
120120
==== Other Additions
@@ -125,33 +125,33 @@ This section describes them.
125125
===== Groovy Support
126126

127127
Spring Integration 2.0 added Groovy support, letting you use the Groovy scripting language to provide integration and business logic.
128-
See <<groovy>> for more details.
128+
See <<./groovy.adoc#groovy,Groovy support>> for more details.
129129

130130
[[new-map-transformer]]
131131
===== Map Transformers
132132

133133
These symmetrical transformers convert payload objects to and from `Map` objects.
134-
See <<transformer>> for more details.
134+
See <<./transformer.adoc#transformer,Transformer>> for more details.
135135

136136
[[new-json-transformer]]
137137
===== JSON Transformers
138138

139139
These symmetrical transformers convert payload objects to and from JSON.
140-
See <<transformer>> for more details.
140+
See <<./transformer.adoc#transformer,Transformer>> for more details.
141141

142142
[[new-serialize-transformer]]
143143
===== Serialization Transformers
144144

145145
These symmetrical transformers convert payload objects to and from byte arrays.
146146
They also support the serializer and deserializer strategy interfaces that Spring 3.0.5 added.
147-
See <<transformer>> for more details.
147+
See <<./transformer.adoc#transformer,Transformer>> for more details.
148148

149149
[[new-refactoring]]
150150
==== Framework Refactoring
151151

152152
The core API went through some significant refactoring to make it simpler and more usable.
153153
Although we anticipate that the impact to developers should be minimal, you should read through this document to find what was changed.
154-
Specifically, you should read <<dynamic-routers>>, <<gateway>>, <<http-outbound>>, <<message>>, and <<aggregator>>.
154+
Specifically, you should read <<./router.adoc#dynamic-routers,Dynamic Routers>>, <<./gateway.adoc#gateway,Messaging Gateways>>, <<./http.adoc#http-outbound,HTTP Outbound Components>>, <<./message.adoc#message,Message>>, and <<./aggregator.adoc#aggregator,Aggregator>>.
155155
If you directly depend on some of the core components (`Message`, `MessageHeaders`, `MessageChannel`, `MessageBuilder`, and others), you need to update any import statements.
156156
We restructured some packaging to provide the flexibility we needed for extending the domain model while avoiding any cyclical dependencies (it is a policy of the framework to avoid such "`tangles`").
157157

0 commit comments

Comments
 (0)