[ 
https://issues.apache.org/jira/browse/S4-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168890#comment-13168890
 ] 

Leo Neumeyer commented on S4-5:
-------------------------------

Checked Fluent S4 API to master. 
https://github.com/leoneu/s4-piper/tree/master/subprojects/s4-core/src/test/java/org/apache/s4/appmaker

For now, this is what an app looks like:

{code:title=S4 Fluent API|borderStyle=dashed}
package org.apache.s4.appmaker;

public class MyApp extends AppMaker {

    @Override
    protected void configure() {

        PEMaker pe1, pe2;
        StreamMaker s1;
        StreamMaker s2, s3;

        pe1 = addPE(PEZ.class);

        s1 = addStream(EventA.class).withName("My first 
stream.").withKey("{gender}").to(pe1);

        pe2 = addPE(PEY.class).to(s1);

        s2 = addStream(EventB.class).withName("My second 
stream.").withKey("{age}").to(pe2);

        s3 = addStream(EventB.class).withName("My third 
stream.").withKey("{height}").to(pe2);

        addPE(PEX.class).to(s2).to(s3);
    }
}
{code} 

                
> Prototype app builder
> ---------------------
>
>                 Key: S4-5
>                 URL: https://issues.apache.org/jira/browse/S4-5
>             Project: Apache S4
>          Issue Type: New Feature
>    Affects Versions: 0.5
>            Reporter: Leo Neumeyer
>            Priority: Minor
>             Fix For: 0.5
>
>
> Extend Guice AbstractModule to create a simple application builder layer. The 
> idea is to evaluate if we can use Guice to do all the wiring including PEs 
> and Streams and Apps.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to