org.jvnet.hk2.component
Interface InhabitantActivator

All Known Implementing Classes:
DefaultRunLevelService

@Contract
public interface InhabitantActivator

Contract for handling the activation and releasing of an inhabitant. Useful when the inhabitant needs to be activated in a particular thread context for example.

Since:
3.1
Author:
Jeff trent
See Also:
RunLevelService

Method Summary
 void activate(Inhabitant<?> inhabitant)
          Implementations are generally expected to call Inhabitant.get() at some point.
 void deactivate(Inhabitant<?> inhabitant)
          Implementations are generally expected to call Inhabitant.release() at some point.
 

Method Detail

activate

void activate(Inhabitant<?> inhabitant)
Implementations are generally expected to call Inhabitant.get() at some point.

The DefaultRunLevelService calls activate for all Inhabitants qualifying in the activated RunLevel regardless of whether or not they need activation.

Parameters:
inhabitant - the inhabitant to activate

deactivate

void deactivate(Inhabitant<?> inhabitant)
Implementations are generally expected to call Inhabitant.release() at some point.

The DefaultRunLevelService calls deactivate for all Inhabitants qualifying in the activated RunLevel regardless of whether or not they need releasing.

Parameters:
inhabitant - the inhabitant to release


Copyright © 2011 Oracle Corporation. All Rights Reserved.