Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9358

PollThread: separate alerting behaviour from alerting event log

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M3
    • 3.3.0.M3
    • server
    • None

      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.

            adietish@redhat.com André Dietisheim
            adietish@redhat.com André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: