@Service(name="globals") @Singleton public class Globals extends Object
Very sensitive class, anything stored here cannot be garbage collected
Modifier and Type | Class and Description |
---|---|
static class |
Globals.GlobalsInitializer
The point of this service is to ensure that the Globals
service is properly initialized by the RunLevelService
at the InitRunLevel.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(Class<T> type)
Gets the service from the default service locator with the specified type
|
static org.glassfish.hk2.api.ServiceLocator |
getDefaultBaseServiceLocator()
Gets the default service locator
|
static org.glassfish.hk2.api.ServiceLocator |
getDefaultHabitat()
Gets the default service locator
|
static org.glassfish.hk2.api.ServiceLocator |
getStaticBaseServiceLocator()
Returns the default service locator.
|
static org.glassfish.hk2.api.ServiceLocator |
getStaticHabitat()
Returns the default service locator.
|
static void |
setDefaultHabitat(org.glassfish.hk2.api.ServiceLocator habitat)
Sets the default service locator to a different one
|
public static org.glassfish.hk2.api.ServiceLocator getDefaultBaseServiceLocator()
This method is identical to getDefaultBaseServiceLocator()
public static org.glassfish.hk2.api.ServiceLocator getDefaultHabitat()
This method is identical to getDefaultBaseServiceLocator()
public static <T> T get(Class<T> type)
See ServiceLocator.getService(java.lang.Class, java.lang.annotation.Annotation...)
T
- type
- public static void setDefaultHabitat(org.glassfish.hk2.api.ServiceLocator habitat)
habitat
- public static org.glassfish.hk2.api.ServiceLocator getStaticBaseServiceLocator()
public static org.glassfish.hk2.api.ServiceLocator getStaticHabitat()
Copyright © 2019. All rights reserved.