org.glassfish.hk2
Interface Module


@Contract
public interface Module

A module defines the binding for a Services instance. The instance will be registered under the name provided by the implementations of this contract by using the annotation value as described in Service.name()

Each module is isolated from each other, so modules that need to access services offered by other modules must inject these Module instances in order to lookup their services. Using injection ensures that modules dependencies are managed.

Each Module must implement the configure(BinderFactory) method to configure its services.

Author:
Jerome Dochez, Jeff Trent

Method Summary
 void configure(BinderFactory binderFactory)
          Main configuration hook for modules.
 

Method Detail

configure

void configure(BinderFactory binderFactory)
Main configuration hook for modules. Modules should use the BinderFactory methods like BinderFactory.bind(String) or BinderFactory.bind(Class, Class[]) to add services through the programmatic DSL.

Parameters:
binderFactory - factory for adding services to the Services instance


Copyright © 2011 Oracle Corporation. All Rights Reserved.