public class BlueprintConfigUtils extends Object
ConfigUtils
class. Basically a small util class that handles the retrieval of relevant
headers from the any given bundle.Modifier and Type | Field and Description |
---|---|
static String |
BLUEPRINT_GRACE_PERIOD
Standard wait for dependencies header
|
static String |
BLUEPRINT_HEADER
Manifest entry name for configuring Blueprint modules
|
static String |
BLUEPRINT_TIMEOUT
Standard timeout header
|
static String |
EXTENDER_VERSION |
Constructor and Description |
---|
BlueprintConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getBlueprintHeader(Dictionary headers)
Returns the "Bundle-Blueprint" if present from the given dictionary.
|
static String[] |
getBlueprintHeaderLocations(Dictionary headers)
Returns the location headers (if any) specified by the Blueprint-Bundle header (if available).
|
static boolean |
getCreateAsync(Dictionary headers)
Shortcut for finding the boolean value for
#DIRECTIVE_CREATE_ASYNCHRONOUSLY directive using the given
headers. |
static boolean |
getPublishContext(Dictionary headers)
Shortcut for finding the boolean value for
#DIRECTIVE_PUBLISH_CONTEXT directive using the given headers. |
static String |
getSymNameHeader(Dictionary headers) |
static long |
getTimeOut(Dictionary headers)
Shortcut for finding the boolean value for
BLUEPRINT_TIMEOUT directive using the given headers. |
static boolean |
getWaitForDependencies(Dictionary headers)
Shortcut for finding the boolean value for
BLUEPRINT_GRACE_PERIOD directive using the given headers. |
static boolean |
hasTimeout(Dictionary headers) |
public static final String BLUEPRINT_HEADER
public static final String BLUEPRINT_GRACE_PERIOD
public static final String BLUEPRINT_TIMEOUT
public static final String EXTENDER_VERSION
public static String getBlueprintHeader(Dictionary headers)
headers
- public static String getSymNameHeader(Dictionary headers)
public static boolean hasTimeout(Dictionary headers)
public static long getTimeOut(Dictionary headers)
BLUEPRINT_TIMEOUT
directive using the given headers.
Assumes the headers belong to a Spring powered bundle. Returns the timeout (in milliseconds) for which the application
context should wait to have its dependencies satisfied.headers
- public static boolean getWaitForDependencies(Dictionary headers)
BLUEPRINT_GRACE_PERIOD
directive using the given headers.
Assumes the headers belong to a Spring powered bundle.headers
- public static boolean getPublishContext(Dictionary headers)
#DIRECTIVE_PUBLISH_CONTEXT
directive using the given headers.
Assumes the headers belong to a Spring powered bundle.headers
- public static boolean getCreateAsync(Dictionary headers)
#DIRECTIVE_CREATE_ASYNCHRONOUSLY
directive using the given
headers.
Assumes the headers belong to a Spring powered bundle.headers
- public static String[] getBlueprintHeaderLocations(Dictionary headers)
ResourceLoader
for loading the configurations.
Different from ConfigUtils.getLocationsFromHeader(String, String)
since "," is used for separating
clauses while ; is used inside a clause to allow parameters or directives besides paths.
Since the presence of the header, disables any processing this method will return null if the header is not
specified, an empty array if it's empty (disabled) or a populated array otherwise.headers
- bundle headersCopyright © 2006–2016. All rights reserved.