org.glassfish.hk2.runlevel
Interface Activator

All Known Implementing Classes:
RunLevelControllerImpl

@Contract
public interface Activator

Contract for handling the activation and deactivation of run level services.

Author:
jtrent, tbeerbower

Method Summary
 void activate(ActiveDescriptor<?> activeDescriptor)
          Activate the run level service associated with given descriptor.
 void awaitCompletion()
          Wait for completion of run level progression.
 void awaitCompletion(long timeout, TimeUnit unit)
          Wait for completion of run level progression.
 void deactivate(ActiveDescriptor<?> activeDescriptor)
          Deactivate the run level service associated with given descriptor.
 

Method Detail

activate

void activate(ActiveDescriptor<?> activeDescriptor)
Activate the run level service associated with given descriptor.

Parameters:
activeDescriptor - the descriptor

deactivate

void deactivate(ActiveDescriptor<?> activeDescriptor)
Deactivate the run level service associated with given descriptor.

Parameters:
activeDescriptor - the descriptor

awaitCompletion

void awaitCompletion()
                     throws ExecutionException,
                            InterruptedException,
                            TimeoutException
Wait for completion of run level progression.

Throws:
ExecutionException - if the completion code threw an exception
TimeoutException - if the wait timed out
InterruptedException - if the current thread was interrupted while waiting

awaitCompletion

void awaitCompletion(long timeout,
                     TimeUnit unit)
                     throws ExecutionException,
                            InterruptedException,
                            TimeoutException
Wait for completion of run level progression.

Parameters:
timeout - the timeout value
unit - the time unit
Throws:
ExecutionException - if the completion code threw an exception
TimeoutException - if the wait timed out
InterruptedException - if the current thread was interrupted while waiting


Copyright © 2013 Oracle Corporation. All Rights Reserved.