com.sun.enterprise.v3.server
Class PostStartupRunLevelBridge

java.lang.Object
  extended by com.sun.enterprise.v3.server.PostStartupRunLevelBridge
All Implemented Interfaces:
org.glassfish.hk2.PostConstruct, org.glassfish.hk2.PreDestroy

@Priority(value=2)
@Service
public class PostStartupRunLevelBridge
extends Object

Provides a bridge from PostStartup to the RunLevelService based approach.

Author:
Jeff Trent, Tom Beerbower

Constructor Summary
PostStartupRunLevelBridge()
           
PostStartupRunLevelBridge(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.
 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

PostStartupRunLevelBridge

public PostStartupRunLevelBridge()

PostStartupRunLevelBridge

public PostStartupRunLevelBridge(Class additionalShutdownClass)
Method Detail

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

activate

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

Parameters:
i - the inhabitant

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.