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

Refactor PollThread so that it does not call server behavior but informs a listener

XMLWordPrintable

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

      The current impl of PollThread is instantiated by the server behavior and then calls the server behavior again (calls stop(force) on it). This is pretty much not what a dumb user programmer would expect. He would expect the poll thread to poll and return it's result to its caller. Furthermore this is not ideal in terms of separations of concerns, since the poll thread implements a strategy to apply if the polling did not reach the expected state (server is up / server is down). A proper design would be to have a poller that polls for the state only and then passes back to the server behavior that then decides what to do in these cases.
      We can achieve this by replacing the call to the behavior by a listener.

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

              Created:
              Updated:
              Resolved: