You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2012/06/06 18:21:17 UTC
svn commit: r820506 - in /websites/production/camel/content:
book-component-appendix.html book-in-one-page.html cache/main.pageCache
stream.html
Author: buildbot
Date: Wed Jun 6 16:21:16 2012
New Revision: 820506
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/stream.html
Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Wed Jun 6 16:21:16 2012
@@ -15717,45 +15717,17 @@ See samples for an example.</p>
<p>In the following sample we route messages from the <tt>direct:in</tt> endpoint to the <tt>System.out</tt> stream:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">@Test
-<span class="code-keyword">public</span> void testStringContent() <span class="code-keyword">throws</span> Exception {
- <span class="code-keyword">try</span> {
- <span class="code-comment">// Given
-</span> <span class="code-object">System</span>.setOut(<span class="code-keyword">new</span> PrintStream(mockOut));
-
- <span class="code-comment">// When
-</span> template.sendBody(<span class="code-quote">"direct:in"</span>, message);
-
- <span class="code-comment">// Then
-</span> assertEquals(message + <span class="code-quote">"\n"</span>, <span class="code-keyword">new</span> <span class="code-object">String</span>(mockOut.toByteArray()));
- } <span class="code-keyword">finally</span> {
- <span class="code-object">System</span>.setOut(stdOut);
- }
-}
-
-@Test
-<span class="code-keyword">public</span> void testBinaryContent() {
- <span class="code-keyword">try</span> {
- <span class="code-comment">// Given
-</span> <span class="code-object">System</span>.setOut(<span class="code-keyword">new</span> PrintStream(mockOut));
-
- <span class="code-comment">// When
-</span> template.sendBody(<span class="code-quote">"direct:in"</span>, message.getBytes());
-
- <span class="code-comment">// Then
-</span> assertEquals(message, <span class="code-keyword">new</span> <span class="code-object">String</span>(mockOut.toByteArray()));
- } <span class="code-keyword">finally</span> {
- <span class="code-object">System</span>.setOut(stdOut);
- }
-}
+<pre class="code-java">
+<span class="code-comment">// Route messages to the standard output.
+</span>from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
-<span class="code-keyword">protected</span> RouteBuilder createRouteBuilder() {
- <span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
- <span class="code-keyword">public</span> void configure() {
- from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
- }
- };
-}
+<span class="code-comment">// Send <span class="code-object">String</span> payload to the standard output.
+</span><span class="code-comment">// Message will be followed by the newline.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Text World"</span>);
+
+<span class="code-comment">// Send <span class="code-object">byte</span>[] payload to the standard output.
+</span><span class="code-comment">// No newline will be added after the message.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Bytes World"</span>.getBytes());
</pre>
</div></div>
Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Wed Jun 6 16:21:16 2012
@@ -36126,45 +36126,17 @@ See samples for an example.</p>
<p>In the following sample we route messages from the <tt>direct:in</tt> endpoint to the <tt>System.out</tt> stream:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">@Test
-<span class="code-keyword">public</span> void testStringContent() <span class="code-keyword">throws</span> Exception {
- <span class="code-keyword">try</span> {
- <span class="code-comment">// Given
-</span> <span class="code-object">System</span>.setOut(<span class="code-keyword">new</span> PrintStream(mockOut));
-
- <span class="code-comment">// When
-</span> template.sendBody(<span class="code-quote">"direct:in"</span>, message);
-
- <span class="code-comment">// Then
-</span> assertEquals(message + <span class="code-quote">"\n"</span>, <span class="code-keyword">new</span> <span class="code-object">String</span>(mockOut.toByteArray()));
- } <span class="code-keyword">finally</span> {
- <span class="code-object">System</span>.setOut(stdOut);
- }
-}
-
-@Test
-<span class="code-keyword">public</span> void testBinaryContent() {
- <span class="code-keyword">try</span> {
- <span class="code-comment">// Given
-</span> <span class="code-object">System</span>.setOut(<span class="code-keyword">new</span> PrintStream(mockOut));
-
- <span class="code-comment">// When
-</span> template.sendBody(<span class="code-quote">"direct:in"</span>, message.getBytes());
-
- <span class="code-comment">// Then
-</span> assertEquals(message, <span class="code-keyword">new</span> <span class="code-object">String</span>(mockOut.toByteArray()));
- } <span class="code-keyword">finally</span> {
- <span class="code-object">System</span>.setOut(stdOut);
- }
-}
+<pre class="code-java">
+<span class="code-comment">// Route messages to the standard output.
+</span>from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
-<span class="code-keyword">protected</span> RouteBuilder createRouteBuilder() {
- <span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
- <span class="code-keyword">public</span> void configure() {
- from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
- }
- };
-}
+<span class="code-comment">// Send <span class="code-object">String</span> payload to the standard output.
+</span><span class="code-comment">// Message will be followed by the newline.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Text World"</span>);
+
+<span class="code-comment">// Send <span class="code-object">byte</span>[] payload to the standard output.
+</span><span class="code-comment">// No newline will be added after the message.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Bytes World"</span>.getBytes());
</pre>
</div></div>
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/stream.html
==============================================================================
--- websites/production/camel/content/stream.html (original)
+++ websites/production/camel/content/stream.html Wed Jun 6 16:21:16 2012
@@ -134,23 +134,17 @@ See samples for an example.</p>
<p>In the following sample we route messages from the <tt>direct:in</tt> endpoint to the <tt>System.out</tt> stream:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">@Test
-<span class="code-keyword">public</span> void testStringContent() <span class="code-keyword">throws</span> Exception {
- template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Text World\n"</span>);
-}
-
-@Test
-<span class="code-keyword">public</span> void testBinaryContent() {
- template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Bytes World\n"</span>.getBytes());
-}
+<pre class="code-java">
+<span class="code-comment">// Route messages to the standard output.
+</span>from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
-<span class="code-keyword">protected</span> RouteBuilder createRouteBuilder() {
- <span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
- <span class="code-keyword">public</span> void configure() {
- from(<span class="code-quote">"direct:in"</span>).to(<span class="code-quote">"stream:out"</span>);
- }
- };
-}
+<span class="code-comment">// Send <span class="code-object">String</span> payload to the standard output.
+</span><span class="code-comment">// Message will be followed by the newline.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Text World"</span>);
+
+<span class="code-comment">// Send <span class="code-object">byte</span>[] payload to the standard output.
+</span><span class="code-comment">// No newline will be added after the message.
+</span>template.sendBody(<span class="code-quote">"direct:in"</span>, <span class="code-quote">"Hello Bytes World"</span>.getBytes());
</pre>
</div></div>