public abstract class InstanceUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATIONS_ATTRIBUTE
Applications attribute for a
Component . |
static String |
CACHE_ATTRIBUTE
Cache attribute for a
Component or an Application . |
static String |
COMPONENT_ATTRIBUTE
Component attribute for an
Application or a GlobalScope . |
static String |
EXECUTOR_ATTRIBUTE
Executor attribute for a
Component . |
static String |
PRUDENCE_VERSION_ATTRIBUTE
Prudence version attribute for a
Component . |
static String |
ROOT_ATTRIBUTE
Root attribute for an
Application or a GlobalScope . |
static String |
SCHEDULER_ATTRIBUTE
Scheduler attribute for a
Component . |
Modifier and Type | Method and Description |
---|---|
static Application |
getApplication(String name)
Gets an application associated with the current Prudence instance.
|
static Component |
getComponent()
The component for the current Prudence instance.
|
String |
getPrudenceVersion()
The Prudence version, based on the current component.
|
static void |
setComponent(Component component) |
public static final String COMPONENT_ATTRIBUTE
Application
or a GlobalScope
.public static final String ROOT_ATTRIBUTE
Application
or a GlobalScope
.public static final String APPLICATIONS_ATTRIBUTE
Component
.public static final String EXECUTOR_ATTRIBUTE
Component
.public static final String SCHEDULER_ATTRIBUTE
Component
.public static final String CACHE_ATTRIBUTE
Component
or an Application
.public static final String PRUDENCE_VERSION_ATTRIBUTE
Component
.public static Component getComponent()
GlobalScope
public static void setComponent(Component component)
component
- The componentgetComponent()
public static Application getApplication(String name)
Expects that a map of applications was set in the "com.threecrickets.prudence.applications" attribute of the component's context.
name
- The application's full namegetComponent()
public String getPrudenceVersion()
Copyright © 2009-2016 Three Crickets LLC.