From be4139c759214cfa890995e4654679e0665938f9 Mon Sep 17 00:00:00 2001 From: Iwein Fuld Date: Fri, 17 Oct 2008 17:39:04 +0000 Subject: [PATCH] half way http and stream docos --- .../src/httpinvoker.xml | 43 +++++++++++++ spring-integration-reference/src/stream.xml | 64 +++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 spring-integration-reference/src/httpinvoker.xml create mode 100644 spring-integration-reference/src/stream.xml diff --git a/spring-integration-reference/src/httpinvoker.xml b/spring-integration-reference/src/httpinvoker.xml new file mode 100644 index 0000000000..9f070d4534 --- /dev/null +++ b/spring-integration-reference/src/httpinvoker.xml @@ -0,0 +1,43 @@ + + + + HttpInvoker + +
+ Introduction + + +
+ +
+ Outbound HttpInvoker + + + + To configure the outbound gateway write a bean definition like this: + + + +
+ +
+ Inbound HttpInvoker + + To receive messages over http you need to use a TODO. This gateway can be configured like this + + + +
+ +
+ HttpInvoker namespace support + + To configure the inbound gateway you can choose to use the namespace support for it. The following code snippet shows the different configuration options that are supported. + + + + To configure the outbound gateway you can use the namespace support as well. The following code snippet shows the different configuration for an outbound HttpInvoker gateway. + + +
+
\ No newline at end of file diff --git a/spring-integration-reference/src/stream.xml b/spring-integration-reference/src/stream.xml new file mode 100644 index 0000000000..9d50367c5d --- /dev/null +++ b/spring-integration-reference/src/stream.xml @@ -0,0 +1,64 @@ + + + + Streams + +
+ Introduction + + In many cases application data is obtained from a stream. It is not recommended to send a reference to a Stream as a message payload to a consumer. Instead messages are created from data that is read from an input stream and message payloads are written to an output stream one by one. + +
+ +
+ Reading from streams + + Spring Integration provides two adapters for streams. Both ByteStreamSource and + CharacterStreamSource implement PollableSource. + By configuring one of these within a channel-adapter element, the polling period can be configured, + and the Message Bus can automatically detect and schedule them. The byte stream version requires an + InputStream, and the character stream version requires a Reader as + the single constructor argument. The ByteStreamSource also accepts the 'bytesPerMessage' + property to determine how many bytes it will attempt to read into each Message. The + default value is 1024 + + + + + + + +]]> + + +
+ +
+ Writing to streams + + For target streams, there are also two implementations: ByteStreamWritingMessageConsumer and + CharacterStreamWritingMessageConsumer. Each requires a single constructor argument - + OutputStream for byte streams or Writer for character streams, + and each provides a second constructor that adds the optional 'bufferSize' property. Since both of these + ultimately implement the MessageConsumer interface, they can be referenced from a + channel-adapter configuration as will be described in more detail in + . + + + +
+ + + +
+ HttpInvoker namespace support + + To configure the inbound gateway you can choose to use the namespace support for it. The following code snippet shows the different configuration options that are supported. + + + + To configure the outbound gateway you can use the namespace support as well. The following code snippet shows the different configuration for an outbound HttpInvoker gateway. + + +
+
\ No newline at end of file