com.sun.enterprise.v3.server
Class StartupRunLevelBridge

java.lang.Object
  extended by com.sun.enterprise.v3.server.StartupRunLevelBridge
All Implemented Interfaces:
FutureProvider<Result<Thread>>, org.glassfish.hk2.PostConstruct, org.glassfish.hk2.PreDestroy

@Priority(value=2)
@Service
public class StartupRunLevelBridge
extends Object
implements FutureProvider<Result<Thread>>

Provides a bridge from Startup to the RunLevelService based approach. Also implements FutureProvider to provide a list of futures for startup service inhabitant activation.

Author:
Jeff Trent, Tom Beerbower

Constructor Summary
StartupRunLevelBridge()
           
StartupRunLevelBridge(Class additionalShutdownClass)
           
 
Method Summary
protected  void activate(org.jvnet.hk2.component.Inhabitant<?> i)
          Activate the given inhabitant.
protected  void deactivate(org.jvnet.hk2.component.Inhabitant<?> i)
          Deactivate the given inhabitant.
 List<Future<Result<Thread>>> getFutures()
           
 void postConstruct()
           
 void preDestroy()
           
protected  boolean qualifies(boolean startup, org.jvnet.hk2.component.Inhabitant<?> i)
          Determine if the given Inhabitant is using the new RunLevel-based mechanism.
protected  List<org.jvnet.hk2.component.Inhabitant<?>> sort(Collection<org.jvnet.hk2.component.Inhabitant<?>> coll)
          Get a sorted List from the the given Collection, reusing the same Collection if provided as a List type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartupRunLevelBridge

public StartupRunLevelBridge()

StartupRunLevelBridge

public StartupRunLevelBridge(Class additionalShutdownClass)
Method Detail

activate

protected void activate(org.jvnet.hk2.component.Inhabitant<?> i)
Activate the given inhabitant.

Parameters:
i - the inhabitant

getFutures

public List<Future<Result<Thread>>> getFutures()
Specified by:
getFutures in interface FutureProvider<Result<Thread>>

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.glassfish.hk2.PostConstruct

preDestroy

public void preDestroy()
Specified by:
preDestroy in interface org.glassfish.hk2.PreDestroy

deactivate

protected void deactivate(org.jvnet.hk2.component.Inhabitant<?> i)
Deactivate the given inhabitant.

Parameters:
i - the inhabitant

qualifies

protected boolean qualifies(boolean startup,
                            org.jvnet.hk2.component.Inhabitant<?> i)
Determine if the given Inhabitant is using the new RunLevel-based mechanism.

Returns:
true if the given inhabitant is annotated with a run level annotation

sort

protected List<org.jvnet.hk2.component.Inhabitant<?>> sort(Collection<org.jvnet.hk2.component.Inhabitant<?>> coll)
Get a sorted List from the the given Collection, reusing the same Collection if provided as a List type.

Returns:
the sorted list


Copyright © 2012. All Rights Reserved.