Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


How to add specific bindings to the basic Sisu example

Here is an expanded version of the 'getting started' tutorial that adds an additional module to publish some scalar parameters.

public static BusBootstrap Main(final String[] cliArguments, final String configFilePathname) {
        ClassLoader classloader = BusBootstrap.class.getClassLoader();

        AbstractModule parameterModule = new AbstractModule()
            protected void configure()
                // Add EDSL binding calls here.

            String[] cliArguments()
                return cliArguments;

            WsBusConfig config() {
                return new WsBusConfig(configFilePathname);

        Injector injector = Guice.createInjector(
                new WireModule(// auto-wires unresolved dependencies
                        new SpaceModule(// scans and binds @Named components
                                new URLClassSpace(classloader)    // abstracts class/resource finding

        return injector.getInstance(BusBootstrap.class);

Back to the top