Inhabitants file describe inhabitants (objects) that are to be placed into the habitat. This file is generated by the APT processor, which is integrated transparently into the build process by the HK2 maven plugin.
The file is by convention placed into / {@value #PATH}/xyz where 'xyz' portion is {@link InhabitantAnnotation#value() the identifier of the habitat}. This allows multiple different habitats to be created over the same set of classes. For example, there can be one habitat for the whole GF, then there are smaller habitats for each JAX-WS deployment.
The file is a UTF-8 encoded text file, and processing is line-based. A line that starts with '#' is treated as a comment and ignored. Other lines are assumed to be in key=value,key=value,... format. =value portion is optional, and this can be used to design keys that are conceptually boolean. The same key can appear multiple times.s
The following keys are defined:
Key | Value |
{@value #CLASS_KEY} | The fully qualified class name of the inhabitant. |
{@value #INDEX_KEY} | The index under which the inhabitant is registered. Multiple values allowed. A value is of the form: {@code PRIMARYNAME[:SUBNAME]}. This is used for all kinds of indexing needs, including {@link Contract} (where PRIMARYNAME is the FQCN of the contract nameand SUBNAME is the component name.) |
|
|
|
|
|
|
|
|
|
|