/** * accept work * * @param e workEvent */ @Override public void workAccepted(WorkEvent e) { if (e.getType() != WorkEvent.WORK_ACCEPTED) fail("Wrong accepted type"); source = e.getSource(); work = e.getWork(); startDuration = e.getStartDuration(); exception = e.getException(); if (callbackCount != null) { synchronized (this) { callbackCount.setAcceptCount(callbackCount.getAcceptCount() + 1); } } super.workAccepted(e); }