use of com.creditease.agent.spi.ISystemActionEngineMgr in project uavstack by uavorg.
the class SystemStarter method createSystemActionEngineMgr.
private ISystemActionEngineMgr createSystemActionEngineMgr() {
ISystemActionEngineMgr saem = new SystemActionEngineMgr();
this.configMgr.registerComponent("Global", "ISystemActionEngineMgr", saem);
log.info(this, "System ActionEngine Manager created");
return saem;
}
use of com.creditease.agent.spi.ISystemActionEngineMgr in project uavstack by uavorg.
the class ProfileDataMessageHandler method pushLatestProfileDataToCacheCenter.
/**
* 推送最新的ProfileData到缓存中心
*
* @param profileString
*/
private List<String> pushLatestProfileDataToCacheCenter(String profileString) {
/**
* setup ProfileDataMessageHandler as IStandardProfileModelListener for StandardProfileModeler
*/
ISystemActionEngineMgr engineMgr = (ISystemActionEngineMgr) ConfigurationManager.getInstance().getComponent("Global", "ISystemActionEngineMgr");
IActionEngine engine = engineMgr.getActionEngine("StandardProfileModelingEngine");
StandardProfileModeler modeler = (StandardProfileModeler) ConfigurationManager.getInstance().getComponent("healthmanager", "StandardProfileModeler");
modeler.setListener(this);
cm.beginBatch();
List<String> monitorDataFrames = JSONHelper.toObjectArray(profileString, String.class);
List<String> newMDFs = new ArrayList<String>();
for (String mdfStr : monitorDataFrames) {
MonitorDataFrame mdf = new MonitorDataFrame(mdfStr);
ActionContext ac = new ActionContext();
ac.putParam(MonitorDataFrame.class, mdf);
ac.putParam("NewMDFList", newMDFs);
ac.putParam("MDFString", mdfStr);
engine.execute("StandardProfileModeler", ac);
}
cm.submitBatch();
return newMDFs;
}
Aggregations