use of com.creditease.agent.spi.IConfigurationManager in project uavstack by uavorg.
the class MSCPGeneralAction method changeNodeConfig.
/**
* changeNodeConfig
*
* @param data
*/
private void changeNodeConfig(UAVHttpMessage data) {
final Map<String, String> params = data.getRequest();
final IConfigurationManager icm = this.getConfigManager();
Thread thd = new Thread(new Runnable() {
@Override
public void run() {
/**
* fire configuration update event
*/
icm.fireProfileConfigurationUpdateEvent(params);
}
});
thd.start();
data.putResponse("rs", "OK");
}
use of com.creditease.agent.spi.IConfigurationManager in project uavstack by uavorg.
the class SystemStarter method createConfigurationManager.
private IConfigurationManager createConfigurationManager(Map<String, String> cmdArgs) {
IConfigurationManager icm = ConfigurationManager.build(cmdArgs);
icm.init();
// register systemstarter
icm.registerComponent("Global", "SystemStarter", this);
return icm;
}
use of com.creditease.agent.spi.IConfigurationManager in project uavstack by uavorg.
the class ConfigurationManager method build.
public static IConfigurationManager build(Map<String, String> cmdArgs) {
// read profile config from profile properties file
String profileName = CommonHelper.getValueFromSeqKeys(cmdArgs, new String[] { "-profile", "-p" });
configMgr = new ConfigurationManager(profileName);
return configMgr;
}
use of com.creditease.agent.spi.IConfigurationManager in project uavstack by uavorg.
the class MSCPPlusIT method onAppStarting.
/**
* onAppStarting
*
* @param args
*/
public void onAppStarting() {
IConfigurationManager cm = ConfigurationManager.getInstance();
InterceptSupport iSupport = InterceptSupport.instance();
InterceptContext context = iSupport.createInterceptContext(Event.WEBCONTAINER_INIT);
context.put(InterceptConstants.WEBAPPLOADER, this.getClass().getClassLoader());
context.put(InterceptConstants.WEBWORKDIR, cm.getContext(IConfigurationManager.ROOT));
context.put(InterceptConstants.CONTEXTPATH, "");
context.put(InterceptConstants.APPNAME, cm.getContext(IConfigurationManager.NODEAPPID));
context.put(InterceptConstants.BASEPATH, "/" + cm.getContext(IConfigurationManager.NODEAPPID));
iSupport.doIntercept(context);
}
use of com.creditease.agent.spi.IConfigurationManager in project uavstack by uavorg.
the class MSCPPlusIT method onAppStart.
/**
* onAppStart
*
* @param args
*/
public void onAppStart() {
// String featureName = (String) args[0];
IConfigurationManager cm = ConfigurationManager.getInstance();
InterceptSupport iSupport = InterceptSupport.instance();
InterceptContext context = iSupport.createInterceptContext(Event.WEBCONTAINER_STARTED);
context.put(InterceptConstants.WEBAPPLOADER, this.getClass().getClassLoader());
context.put(InterceptConstants.WEBWORKDIR, cm.getContext(IConfigurationManager.ROOT));
context.put(InterceptConstants.CONTEXTPATH, "");
context.put(InterceptConstants.APPNAME, cm.getContext(IConfigurationManager.NODEAPPID));
context.put(InterceptConstants.BASEPATH, "/" + cm.getContext(IConfigurationManager.NODEAPPID));
iSupport.doIntercept(context);
}
Aggregations