@Override
    protected void configure() {

        // Create the required DirectoryResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryResource<Connection, APIConnection>>() {},
                    ConnectionDirectoryResource.class
                )
                .build(new TypeLiteral<DirectoryResourceFactory<Connection, APIConnection>>() {}));

        // Create the required DirectoryObjectResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryObjectResource<Connection, APIConnection>>() {},
                    ConnectionResource.class
                )
                .build(new TypeLiteral<DirectoryObjectResourceFactory<Connection, APIConnection>>() {}));

        // Bind translator for converting between Connection and APIConnection
        bind(new TypeLiteral<DirectoryObjectTranslator<Connection, APIConnection>>() {})
                .to(ConnectionObjectTranslator.class);

    }
Guice Module which configures injections required for handling Connection
resources via the REST API.
guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionModule.java