Camel-Core 分析 (1)

<p>在Camel中定義一個路由最基本的元素有Context,Component,endPoint 。</p> <p>在下圖中能夠看到Camel的頂層接口爲Service. Camel的組件(好比Route,Component,Component,Endpoint,)都是以服務的形式裝載.CamelContext自己也是一個服務。</p> <p>能夠看出Service是Camel最基本的接口。</p> <p>Service有兩個子接口:可中止的接口ShutdownableServce和可暫停的接口SuspendableService。</p> <p>StatefulService接口繼承上面兩個接口,同時提供了狀態查詢的方法。</p> <p>ServiceSupport做爲一個抽象類,實現了StatefulService的接口,同時提供了抽象方法doStart,doStop.</p> <p>DefaultRoute,DefaultComponent,DefaultEndPoint,Default。。。。。都繼承了ServiceSupport類,同時實現了本身對應的接口。</p> <p>&#160;</p> <p><a href="http://static.oschina.net/uploads/img/201306/09163743_E7kG.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://static.oschina.net/uploads/img/201306/09163744_WvJU.png" width="939" height="705" /></a></p>.net

相關文章
相關標籤/搜索