}
if (nodeEvent.getEventCode().equals(MasterEventCode.GET_TASK)) {
//INFO信息记录M/S通信内容
if (logger.isInfoEnabled()) {
GetTaskRequestEvent requestEvent = (GetTaskRequestEvent) nodeEvent;
String jobName = requestEvent.getJobName();
int jobCount = requestEvent.getRequestJobCount();
StringBuffer stringBuffer = new StringBuffer("receive get_task event, jobName:");
if (jobName != null)
stringBuffer.append("jobName:").append(jobName).append(",");
stringBuffer.append("jobCount:").append(jobCount).append(",from:")
.append(channel.getRemoteAddress()).append(",squence:").append(nodeEvent.getSequence());
logger.info(stringBuffer.toString());
}
}
if(nodeEvent.getEventCode().equals(MasterEventCode.SEND_RESULT)) {
//INFO信息记录M/S通信内容
if(logger.isInfoEnabled()) {
SendResultsRequestEvent requestEvent = (SendResultsRequestEvent)nodeEvent;
StringBuffer stringBuffer = new StringBuffer("receive send_result event, result:{");
stringBuffer.append(requestEvent.getJobTaskResult().toString()).append("}");
stringBuffer.append("from slave:").append(channel.getRemoteAddress()).append(",squence:").append(nodeEvent.getSequence());
logger.info(stringBuffer.toString());
}
}
if(nodeEvent.getEventCode().equals(MasterEventCode.SEND_MONITOR_INFO)) {
//INFO信息记录M/S通信内容
if(logger.isInfoEnabled()) {
SendMonitorInfoEvent requestEvent = (SendMonitorInfoEvent)nodeEvent;
StringBuffer stringBuffer = new StringBuffer("receive send_monitor_info event, result:{");
stringBuffer.append(requestEvent.getSlaveMonitorInfo().toString()).append("}");
stringBuffer.append("from slave:").append(channel.getRemoteAddress()).append(",squence:").append(nodeEvent.getSequence());
logger.info(stringBuffer.toString());
}
}
}