org.glassfish.hk2.inhabitants
Interface InhabitantStore

All Known Implementing Classes:
InhabitantsParser, OSGiInhabitantsParser

public interface InhabitantStore

Contract abstracting the storage of inhabitants into a backing store (which is usually the habitat in most situations).

Author:
Jeff Trent

Method Summary
 void add(Inhabitant<?> i)
          Adds the given inhabitant to the backing store (usually the habitat)
 void addIndex(Inhabitant<?> i, String typeName, String name)
          Adds the given inhabitant index to the backing store (usually the habitat)
 boolean remove(Inhabitant<?> inhabitant)
          Removes an inhabitant
 boolean removeIndex(String index, Object serviceOrInhabitant)
          Removes an Inhabitant index for a specific service or inhabitant
 boolean removeIndex(String index, String name)
          Removes a named Inhabitant index for a specific contract and name
 

Method Detail

add

void add(Inhabitant<?> i)
Adds the given inhabitant to the backing store (usually the habitat)


addIndex

void addIndex(Inhabitant<?> i,
              String typeName,
              String name)
Adds the given inhabitant index to the backing store (usually the habitat)


remove

boolean remove(Inhabitant<?> inhabitant)
Removes an inhabitant

Parameters:
inhabitant - inhabitant to be removed
Returns:
true if the inhabitant was removed

removeIndex

boolean removeIndex(String index,
                    String name)
Removes a named Inhabitant index for a specific contract and name

Parameters:
index - the contract name
name - the instance name, optionally provided
Returns:
true if the removal was successful

removeIndex

boolean removeIndex(String index,
                    Object serviceOrInhabitant)
Removes an Inhabitant index for a specific service or inhabitant

Parameters:
index - the contract name
serviceOrInhabitant - the service instance, or inhabitant instance
Returns:
true if the removal was successful


Copyright © 2013 Oracle Corporation. All Rights Reserved.