use of com.centurylink.mdw.service.Action in project mdw-designer by CenturyLinkCloud.
the class LogSubscriberSocket method notifyServer.
private void notifyServer(boolean on) throws Exception {
ActionRequestDocument msgdoc = ActionRequestDocument.Factory.newInstance();
ActionRequest actionRequest = msgdoc.addNewActionRequest();
Action action = actionRequest.addNewAction();
action.setName("RegressionTest");
Parameter param = action.addNewParameter();
param.setName("Maintenance");
param.setStringValue("Watching");
param = action.addNewParameter();
param.setName("Server");
InetAddress ownIP = InetAddress.getLocalHost();
param.setStringValue(ownIP.getHostAddress() + ":" + LoggerUtil.getStandardLogger().getDefaultPort());
param = action.addNewParameter();
param.setName("Mode");
param.setStringValue(on ? "on" : "off");
String request;
if (oldNamespaces)
request = DesignerCompatibility.getInstance().getOldActionRequest(msgdoc);
else
request = msgdoc.xmlText();
dao.engineCall(request);
}
Aggregations