The current impl of PollThread does inform the event log in a method that does alert the server behavior of the outcome of the polling ( if(finalAlert) ... ) in #alertBehavior:
protected void alertBehavior(boolean currentState, boolean finalAlert) { if (currentState != expectedState) { // it didnt work... cancel all processes! force stop behavior.stop(true); if (finalAlert) alertEventLogFailure(); } else { if (currentState == IServerStatePoller.SERVER_UP) behavior.setServerStarted(); else behavior.stop(true); if (finalAlert) alertEventLogSuccess(currentState); } }
This shall be separated into into its own method.