Example #1
0
  /**
   * start work
   *
   * @param e workEvent
   */
  @Override
  public void workRejected(WorkEvent e) {
    if (e.getType() != WorkEvent.WORK_REJECTED) fail("Wrong rejected type");

    source = e.getSource();
    work = e.getWork();
    startDuration = e.getStartDuration();
    exception = e.getException();

    if (callbackCount != null) {
      synchronized (this) {
        callbackCount.setRejectedCount(callbackCount.getRejectedCount() + 1);
      }
    }

    super.workRejected(e);
  }