|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.hk2.component.MultiThreadedInhabitantActivator
public class MultiThreadedInhabitantActivator
A simple multi-threaded based InhabitantActivator
| Constructor Summary | |
|---|---|
MultiThreadedInhabitantActivator()
|
|
| Method Summary | |
|---|---|
void |
activate(Inhabitant<?> inhabitant)
Implementations are generally expected to call Inhabitant.get() at
some point. |
void |
awaitCompletion()
Called after all InhabitantActivator.activate(Inhabitant) and InhabitantActivator.deactivate(Inhabitant)
calls are made to wait for completion of a progression to a particular run level. |
void |
awaitCompletion(long timeout,
TimeUnit unit)
Called after all InhabitantActivator.activate(Inhabitant) and InhabitantActivator.deactivate(Inhabitant)
calls are made to wait for completion of a progression to a particular run level. |
void |
deactivate(Inhabitant<?> inhabitant)
Implementations are generally expected to call Inhabitant.release() at
some point. |
void |
setExecutorService(Executor es)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiThreadedInhabitantActivator()
| Method Detail |
|---|
public void setExecutorService(Executor es)
public void activate(Inhabitant<?> inhabitant)
InhabitantActivatorInhabitant.get() at
some point.
The DefaultRunLevelService calls activate for all Inhabitants qualifying
in the activated RunLevel regardless of whether or not they need activation.
activate in interface InhabitantActivatorinhabitant - the inhabitant to activatepublic void deactivate(Inhabitant<?> inhabitant)
InhabitantActivatorInhabitant.release() at
some point.
The DefaultRunLevelService calls deactivate for all Inhabitants qualifying
in the activated RunLevel regardless of whether or not they need releasing.
deactivate in interface InhabitantActivatorinhabitant - the inhabitant to release
public void awaitCompletion()
throws InterruptedException,
ExecutionException,
TimeoutException
InhabitantActivatorInhabitantActivator.activate(Inhabitant) and InhabitantActivator.deactivate(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.
awaitCompletion in interface InhabitantActivatorInterruptedException
ExecutionException
TimeoutException
public void awaitCompletion(long timeout,
TimeUnit unit)
throws ExecutionException,
InterruptedException,
TimeoutException
InhabitantActivatorInhabitantActivator.activate(Inhabitant) and InhabitantActivator.deactivate(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.
awaitCompletion in interface InhabitantActivatorExecutionException
InterruptedException
TimeoutException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||