camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Stub
Date Fri, 02 Mar 2012 16:13:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Stub</a></h2>
    <h4>Page <b>edited</b> by             <a href="">James
                         <h4>Changes (1)</h4>
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >Under the covers the Stub component
creates [VM] endpoints. <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >So if you are in development and
want to try a route out but don&#39;t want to connect to a specific <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">[Smtp]</span>
<span class="diff-added-words"style="background-color: #dfd;">[SMTP]</span> or
[Http] endpoint, just put *stub:* in front and stub it out! :) <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. URI format <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="Stub-StubComponent"></a>Stub Component</h2>

<p><b>Available as of Camel 2.10</b></p>

<p>The <b>stub:</b> component provides a simple way to stub out any physical
endpoints for easy testing. Just add <b>stub:</b> in front of any endpoint URI
and things just work.</p>

<p>Under the covers the Stub component creates <a href="/confluence/display/CAMEL/VM"
title="VM">VM</a> endpoints.</p>

<p>So if you are in development and want to try a route out but don't want to connect
to a specific <a href="/confluence/pages/createpage.action?spaceKey=CAMEL&amp;title=SMTP&amp;linkCreation=true&amp;fromPageId=27839951"
class="createlink">SMTP</a> or <a href="/confluence/display/CAMEL/HTTP" title="HTTP">HTTP</a>
endpoint, just put <b>stub:</b> in front and stub it out! <img class="emoticon"
src="/confluence/images/icons/emoticons/smile.gif" height="20" width="20" align="absmiddle"
alt="" border="0"/></p>

<h3><a name="Stub-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">

<p>Where <b><tt>someUri</tt></b> can be any URI at all with
any query. </p>

<p><b>Note</b> the main difference between <a href="/confluence/display/CAMEL/Stub"
title="Stub">Stub</a> and <a href="/confluence/display/CAMEL/VM" title="VM">VM</a>
is that <a href="/confluence/display/CAMEL/VM" title="VM">VM</a> will validate
the URI and parameters you give it; so putting vm: in front of a typical URI with query arguments
will typically fail; Stub wont though, it will basically ignore all the query parameters to
let you quickly just stub out one or more endpoints in your route temporarily. </p>

<h3><a name="Stub-Examples"></a>Examples</h3>

<p>Here's a few samples</p>

	<li>stub:<a href="" class="external-link" rel="nofollow"></a></li>

<h3><a name="Stub-SeeAlso"></a>See Also</h3>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting

        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View Online</a>
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message