org.jvnet.hk2.component
Interface InhabitantActivator


Deprecated.

@Deprecated
@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.

Author:
Jeff Trent
See Also:
RunLevelService

Method Summary
 void activate(Inhabitant<?> inhabitant)
          Deprecated. Implementations are generally expected to call Inhabitant.get() at some point.
 void awaitCompletion()
          Deprecated. Called after all activate(org.jvnet.hk2.component.Inhabitant) and deactivate(org.jvnet.hk2.component.Inhabitant) calls are made to wait for completion of a progression to a particular run level.
 void awaitCompletion(long timeout, TimeUnit unit)
          Deprecated. Called after all activate(org.jvnet.hk2.component.Inhabitant) and deactivate(org.jvnet.hk2.component.Inhabitant) calls are made to wait for completion of a progression to a particular run level.
 void deactivate(Inhabitant<?> inhabitant)
          Deprecated. Implementations are generally expected to call Inhabitant.release() at some point.
 

Method Detail

activate

void activate(Inhabitant<?> inhabitant)
Deprecated. 
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)
Deprecated. 
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

awaitCompletion

void awaitCompletion()
                     throws ExecutionException,
                            InterruptedException,
                            TimeoutException
Deprecated. 
Called after all activate(org.jvnet.hk2.component.Inhabitant) and deactivate(org.jvnet.hk2.component.Inhabitant) calls are made to wait for completion of a progression to a particular run level. This is useful in the case where the implementation is asynchronous in nature.

Generally, there is one awaitCompletion() call per RunLevel being processed.

Throws:
ExecutionException
InterruptedException
TimeoutException

awaitCompletion

void awaitCompletion(long timeout,
                     TimeUnit unit)
                     throws ExecutionException,
                            InterruptedException,
                            TimeoutException
Deprecated. 
Called after all activate(org.jvnet.hk2.component.Inhabitant) and deactivate(org.jvnet.hk2.component.Inhabitant) calls are made to wait for completion of a progression to a particular run level. This is useful in the case where the implementation is asynchronous in nature.

Generally, there is one awaitCompletion() call per RunLevel being processed.

Throws:
ExecutionException
InterruptedException
TimeoutException


Copyright © 2013 Oracle Corporation. All Rights Reserved.