From 1b3a7c5d0e59f54a2941a101844638970786949b Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 23 Jan 2008 05:36:02 +0000 Subject: [PATCH] Documentation updates --- .../resources/changelog.txt | 29 ++++++++ build-spring-integration/resources/readme.txt | 30 +++++++++ .../reference/src/adapters.xml | 66 +++++++++++++++++-- .../reference/src/overview.xml | 26 +++++++- 4 files changed, 145 insertions(+), 6 deletions(-) diff --git a/build-spring-integration/resources/changelog.txt b/build-spring-integration/resources/changelog.txt index b4288cf59b..d7b256129e 100644 --- a/build-spring-integration/resources/changelog.txt +++ b/build-spring-integration/resources/changelog.txt @@ -4,3 +4,32 @@ SPRING INTEGRATION CHANGELOG Changes in version 1.0 M1 (Jan 23, 2008) ---------------------------------------- +This is the initial release of Spring Integration. + +The following are the key messaging components defined in this release: + org.springframework.integration.message.Message + org.springframework.integration.channel.MessageChannel + org.springframework.integration.endpoint.MessageEndpoint + org.springframework.integration.handler.MessageHandler + org.springframework.integration.bus.MessageBus + +The following adapters are also available in this release: + org.springframework.integration.adapter.event.ApplicationEventSourceAdapter + org.springframework.integration.adapter.event.ApplicationEventTargetAdapter + org.springframework.integration.adapter.file.FileSourceAdapter + org.springframework.integration.adapter.file.FileTargetAdapter + org.springframework.integration.adapter.jms.JmsMessageDrivenSourceAdapter + org.springframework.integration.adapter.jms.JmsPollingSourceAdapter + org.springframework.integration.adapter.jms.JmsTargetAdapter + org.springframework.integration.adapter.stream.ByteStreamSourceAdapter + org.springframework.integration.adapter.stream.ByteStreamTargetAdapter + org.springframework.integration.adapter.stream.CharacterStreamSourceAdapter + org.springframework.integration.adapter.stream.CharacterStreamTargetAdapter + +Many of these components and adapters may be configured with either XML namespace +support or annotations. Some additional components may be configured with annotations, +such as: @Router, @Splitter, @Publisher, and @Subscriber. + +Please consult the documentation located within the 'docs/reference' directory of this +release for more information and also visit the official Spring Integration home at: +http://www.springframework.org/spring-integration diff --git a/build-spring-integration/resources/readme.txt b/build-spring-integration/resources/readme.txt index a4424ecb47..30eda01423 100644 --- a/build-spring-integration/resources/readme.txt +++ b/build-spring-integration/resources/readme.txt @@ -1,2 +1,32 @@ SPRING INTEGRATION 1.0 M1 (JAN 23 2008) --------------------------------------- + +This is the initial release of Spring Integration. + +The following are the key messaging components defined in this release: + org.springframework.integration.message.Message + org.springframework.integration.channel.MessageChannel + org.springframework.integration.endpoint.MessageEndpoint + org.springframework.integration.handler.MessageHandler + org.springframework.integration.bus.MessageBus + +The following adapters are also available in this release: + org.springframework.integration.adapter.event.ApplicationEventSourceAdapter + org.springframework.integration.adapter.event.ApplicationEventTargetAdapter + org.springframework.integration.adapter.file.FileSourceAdapter + org.springframework.integration.adapter.file.FileTargetAdapter + org.springframework.integration.adapter.jms.JmsMessageDrivenSourceAdapter + org.springframework.integration.adapter.jms.JmsPollingSourceAdapter + org.springframework.integration.adapter.jms.JmsTargetAdapter + org.springframework.integration.adapter.stream.ByteStreamSourceAdapter + org.springframework.integration.adapter.stream.ByteStreamTargetAdapter + org.springframework.integration.adapter.stream.CharacterStreamSourceAdapter + org.springframework.integration.adapter.stream.CharacterStreamTargetAdapter + +Many of these components and adapters may be configured with either XML namespace +support or annotations. Some additional components may be configured with annotations, +such as: @Router, @Splitter, @Publisher, and @Subscriber. + +Please consult the documentation located within the 'docs/reference' directory of this +release for more information and also visit the official Spring Integration home at: +http://www.springframework.org/spring-integration diff --git a/spring-integration-reference/reference/src/adapters.xml b/spring-integration-reference/reference/src/adapters.xml index f2b4c32f86..4d5a248ee3 100644 --- a/spring-integration-reference/reference/src/adapters.xml +++ b/spring-integration-reference/reference/src/adapters.xml @@ -10,7 +10,7 @@ system or component to send-to and/or receive-from a MessageChannel. Within Spring Integration, there is a distinction between source adapters and target adapters. In the 1.0 Milestone 1 release, Spring Integration includes adapters for JMS, Files, - Streams, Spring ApplicationEvents, as well as general purpose Method-invoking adapters. + Streams, and Spring ApplicationEvents. @@ -51,9 +51,10 @@ ]]> - In both cases, Spring's MessageConverter strategy is used to convert the JMS - message into a plain Java object, and then Spring Integration's MessageMapper - strategy is used to convert from the plain object to a Message. + For both source adapter types, Spring's MessageConverter strategy is used to + convert the JMS message into a plain Java object, and then Spring Integration's + MessageMapper strategy is used to convert from the plain object to a + Message. The JmsTargetAdapter is a MessageHandler implementation @@ -63,4 +64,61 @@ adapter with Spring Integration's namespace support. +
+ File Adapters + + The FileSourceAdapter extends the generic PollingSourceAdapter + (just as the polling JMS adapter does). It requires the following constructor arguments: + public FileSourceAdapter(File directory, MessageChannel channel, int period) + Optional properties include 'initialDelay' and 'maxMessagesPerTask'. + + + The FileTargetAdapter constructor only requires the 'directory' argument. The target + adapter also accepts an implementation of the FileNameGenerator strategy that + defines the following method: String generateFileName(Message message) + + + As with the JMS adapters, the most convenient way to configure File adapters is with the namespace support. For + examples, see . + +
+
+ Stream Adapters + + Spring Integration also provides adapters for streams. Both ByteStreamSourceAdapter and + CharacterStreamSourceAdapter extend the PolllingSourceAdapter so + that the polling period can be configured, and the Message Bus can automatically detect and schedule them. Both + require an InputStream as the single constructor argument. The + ByteStreamSourceAdapter also accepts the 'bytesPerMessage' property to determine how many + bytes it will attempt to read into each Message. + + + For target streams, there are also two implementations: ByteStreamTargetAdapter and + CharacterStreamTargetAdapter. Each defines a constructor that requires an + OutputStream, and each provides a second constructor that adds the optional + 'bufferSize' property. Since both of these ultimately implement the MessageHandler + interface, they can be referenced from an endpoint configuration as will be described in more detail in + . + +
+
+ ApplicationEvent Adapters + + Spring ApplicationEvents can also be integrated as either a source or target for Spring + Integration message channels. To receive the events and send to a channel, simply define an instance of Spring + Integration's ApplicationEventSourceAdapter (as with all source adapters, if a + MessageBus is defined, it will automatically detect the event source adapter). The + ApplicationEventSourceAdapter implements Spring's + ApplicationListener interface. By default it will pass all received events as + Spring Integration Messages. To limit based on the type of event, configure the list of event types that you + want to receive with the 'eventTypes' property. + + + To send Spring ApplicationEvents, register an instance of the + ApplicationEventTargetAdapter class as the handler of an endpoint (such configuration + will be described in detail in ). This adapter implements Spring's + ApplicationEventPublisherAware and thus acts as a bridge between Spring + Integration Messages and ApplicationEvents. + +
\ No newline at end of file diff --git a/spring-integration-reference/reference/src/overview.xml b/spring-integration-reference/reference/src/overview.xml index d8bea7e1d3..88cba33ad2 100644 --- a/spring-integration-reference/reference/src/overview.xml +++ b/spring-integration-reference/reference/src/overview.xml @@ -105,8 +105,10 @@ A Message Channel represents the "pipe" of a pipes-and-filters architecture. Producers send Messages to a MessageChannel, and consumers receive Messages from a MessageChannel. The send and receive methods both come - in two forms: one that blocks indefinitely and one that accepts a timeout. For an immediate return, specify a - timeout value of 0. + in two forms: one that blocks indefinitely and one that accepts a timeout (for an immediate return, specify a + timeout value of 0). There are two main types of channels: Point-to-Point channels where + typically a single consumer will receive the Message and Publish-Subscribe channels where + all subscribers should receive the Message.
@@ -122,6 +124,26 @@ .
+
+ Message Router + + A Message Router is a particular type of endpoint that is capable of receiving a Message and then deciding what + channel or channels should receive the Message next. Typically the decision is based upon the Message's content + and/or metadata. A Message Router is often used as a dynamic alternative to configuring the input and output + channels for an endpoint. + +
+
+ Channel Adapter + + A Channel Adapter is used to connect components to a Message Channel when those components are not themselves + Message Endpoints. These adapters provide a mechanism for connecting to external systems, such as JMS queues + or a File system. Channel Adapters may be configured for input and/or output. An input (source) adapter will + receive (or poll for) data, convert that data to a Message, and then send that Message to its Message Channel. + An output (target) adapter is simply another type of Message Endpoint, but when it receives a Message, it will + convert it to the target's expected type and then "send" it (publish to a JMS queue, write to a File, etc.). + +
Message Bus