Search in sources :

Example 6 with Action

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);
}
Also used : Action(com.centurylink.mdw.service.Action) ActionRequest(com.centurylink.mdw.service.ActionRequestDocument.ActionRequest) Parameter(com.centurylink.mdw.service.Parameter) InetAddress(java.net.InetAddress) ActionRequestDocument(com.centurylink.mdw.service.ActionRequestDocument)

Aggregations

Action (com.centurylink.mdw.service.Action)6 ActionRequestDocument (com.centurylink.mdw.service.ActionRequestDocument)6 Parameter (com.centurylink.mdw.service.Parameter)6 ActionRequest (com.centurylink.mdw.service.ActionRequestDocument.ActionRequest)5 VariableVO (com.centurylink.mdw.model.value.variable.VariableVO)1 InetAddress (java.net.InetAddress)1 Date (java.util.Date)1