Agreed with matzew and some suggestions.

Try to enforce the chain if the **order** of the method call matters to you, returning 'this' user could call:

Pipe<Bar> barPipe = pipeline.newPipe()
        .withName("bar")
        .useClass(Bar.class)
        .withType(REST)
        .withEnpoint("my-crazy-endpoing")
        .build();

Or

Pipe<Bar> barPipe = pipeline.newPipe()
        .useClass(Bar.class)
        .withEnpoint("my-crazy-endpoing")
        .withName("bar")
        .withType(REST)
         .build();

-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:

Look great!

minor things:

* newPipe() ==> pipe();
* withFoo(arg) ==> foo(arg);


-M

On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <daniel@passos.me> wrote:
Hey Guys,

What do you think about draft of Pipe Builder? =>

--
Daniel Passos


_______________________________________________
aerogear-dev mailing list



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev