@Builtin @Name(value="org.eiichiro.gig.Configuration") @Singleton(eager=true) public class Configuration extends Object
Configuration is a built-in place holder for Gig application's
configuration settings.| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENTS |
static String |
COMPONENTS_JS |
static String |
DEPLOYMENT |
static String |
ENDPOINTS |
static String |
PIPELINE |
static String |
REQUEST_TYPES |
static String |
RESPONSE_TYPES |
static String |
ROUTING |
static String |
ROUTING_JS |
static String |
SETTINGS_JS |
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
void |
activated()
Attempts to load pre-defined configuration files.
|
void |
constructed()
Sets up Mozilla Rhino's script scope.
|
<T> T |
get(String key)
Returns the configuration setting corresponding to the specified key.
|
void |
load(String file)
Loads the specified configuration file written in JavaScript.
|
<T> void |
set(String key,
T value)
Sets the specified configuration setting with the specified key.
|
public static final String ENDPOINTS
public static final String PIPELINE
public static final String REQUEST_TYPES
public static final String RESPONSE_TYPES
public static final String ROUTING
public static final String DEPLOYMENT
public static final String COMPONENTS
public static final String COMPONENTS_JS
public static final String ROUTING_JS
public static final String SETTINGS_JS
@Constructed public void constructed()
@Activated public void activated()
public void load(String file)
file - Configuration file written in JavaScript.public <T> T get(String key)
key - The key to the configuration setting.public <T> void set(String key, T value)
key - The key to the configuration setting.value - The value of the configuration setting.Copyright © 2011-2014 Eiichiro Uchiumi. All Rights Reserved.