// get state of all services
scmpReply.setBody(this.getStateOfServicesString(serviceName));
} catch (Exception e) {
LOGGER.debug("service=" + serviceName + " not found");
// SCMP Version request
scmpReply = new SCMPMessageFault(reqMsg.getSCMPVersion(), SCMPError.SERVICE_NOT_FOUND, serviceName);
}
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
return;
}
if (Constants.CC_CMD_SESSIONS.equalsIgnoreCase(callKey)) {
// state for service requested
LOGGER.debug("sessions request for service=" + serviceName);
try {
// get sessions of all services
scmpReply.setBody(this.getSessionsOfServicesString(serviceName));
} catch (Exception e) {
LOGGER.debug("service=" + serviceName + " not found");
scmpReply = new SCMPMessageFault(reqMsg.getSCMPVersion(), SCMPError.SERVICE_NOT_FOUND, serviceName);
}
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
return;
}
if (Constants.CC_CMD_SERVICE_CONF.equalsIgnoreCase(callKey)) {
LOGGER.debug("service configuration request for serviceName=" + serviceName);
try {
scmpReply.setBody(this.getServiceConfigurationString(serviceName));
} catch (Exception e) {
LOGGER.debug("service=" + serviceName + " not found");
scmpReply = new SCMPMessageFault(reqMsg.getSCMPVersion(), SCMPError.SERVICE_NOT_FOUND, serviceName);
}
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
return;
}
if (Constants.CC_CMD_INSPECT_CACHE.equalsIgnoreCase(callKey)) {
String cacheId = urlRequestString.getParamValue("cacheId");
LOGGER.debug("cache inspect for serviceName=" + serviceName + ", cacheId=" + cacheId);
String cacheInspectString = this.getCacheInspectString(serviceName, cacheId);
scmpReply.setBody(cacheInspectString);
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
return;
}
if (Constants.CC_CMD_SC_VERSION.equalsIgnoreCase(callKey)) {
LOGGER.debug("sc version request");
String scVersion = Constants.CC_CMD_SC_VERSION + Constants.EQUAL_SIGN + SCVersion.CURRENT;
scmpReply.setBody(scVersion);
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
return;
}
LOGGER.error("wrong inspect command body=" + bodyString); // body has bad syntax
scmpReply = new SCMPMessageFault(reqMsg.getSCMPVersion(), SCMPError.V_WRONG_INSPECT_COMMAND, bodyString);
response.setSCMP(scmpReply);
// initiate responder to send reply
responderCallback.responseCallback(request, response);
}