Overview
The purpose of this page is to illustrate the plan for ApplicationTemplate and Application consolidation. This work is being tracked in
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...
Code Block |
---|
public interface ApplicationContext<T extends Config> { T getConfig(); } public interface Application<T extends Config> { void configure(ApplicationConfigurer configurer, ApplicationContext<T> context); } public abstract class AbstractApplication<T> implements Application<T extends Config> { ... protected final ApplicationContext<T> getContext() { return context; } } public class MyApp extends AbstractApplication<MyApp.MyConfig> { public static class MyConfig { private String stream; private String table; private MyFlowConfig flowOptions; } public void configure() { MyConfig config = getContext().getConfig(); addStream(new Stream(config.stream)); createDataset(config.table, Table.class); addFlow(config.stream, config.table, config.flowOptions); } } |
Details
The sequence of events now looks like: (insert sequence diagram)