camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deckerego <decker...@gmail.com>
Subject Re: Component Design - SMSLib
Date Thu, 26 Jan 2012 17:50:44 GMT
My advice would be to read over the source for the file endpoint first - it's
fairly bare-bones and makes it easy to comprehend how things work (for
example, how endpoints receive parameters and then pass those along to
consumers and producers). From there it's helpful to go through the mock
endpoint and get a new point of view for how things are constructed largely
in-memory. To get a better idea of how asynchronous production works, the
source for the HTTP component is a good place to start.

You'll see a common thread amongst the file/HTTP/mock components on common
design patterns, including:
- Start out with separate Component/Endpoint/Producer/Consumer/Message and
unit test them out the wazoo individually
- Use Camel's thread pool strategy when creating new thread pools
- Use helper methods such as DefaultComponent.setProperties to set options
from the URI onto your endpoint
-
DefaultAsyncProducer/DefaultConsumer/DefaultEndpoint/DefaultComponent/DefaultMessege
should be the base classes you need


Alex Anderson wrote
> 
> * are there any good resources for writing Endpoints that I should be
> reading?
> * does anyone know of any similarly-modelled components whose source
> might provide guidance?
> * are there any patterns or base classes that I should obviously be
> using for my Component, Endpoint, Consumer or Producer
> implementations?
> * is there anyone else interested in this component who could cast an
> eye over the code?
> 


--
View this message in context: http://camel.465427.n5.nabble.com/Component-Design-SMSLib-tp5432954p5433557.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message