}
public JdStateDuccEvent getState() {
String methodName = "getState";
duccOut.trace(methodName, null, duccMsg.fetch("enter"));
JdStateDuccEvent jdStateDuccEvent = new JdStateDuccEvent();
if(active.get()) {
publicationCounter.addAndGet(1);
try {
duccOut.debug(methodName, null, duccMsg.fetch("publishing state"));
if(thread != null) {
thread.rectifyStatus();
DriverStatusReport dsr = thread.getDriverStatusReportCopy();
if(dsr == null) {
duccOut.debug(methodName, null, duccMsg.fetch("dsr is null"));
}
else {
duccOut.debug(methodName, null, "driverState:"+dsr.getDriverState());
duccOut.debug(methodName, dsr.getDuccId(), dsr.getLogReport());
jdStateDuccEvent.setState(dsr);
}
publisher();
}
else {
duccOut.debug(methodName, null, duccMsg.fetch("thread is null"));