[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-9359) Refactor PollThread so that it does not call server behavior but informs a listener

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Fri Jul 22 14:38:23 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616011#comment-12616011 ] 

Andre Dietisheim commented on JBIDE-9359:
-----------------------------------------

The Pollthread now does not call #stop(true) on delegates but informs PollResultListeners that were registered to it (by the delegates).


> Refactor PollThread so that it does not call server behavior but informs a listener
> -----------------------------------------------------------------------------------
>
>                 Key: JBIDE-9359
>                 URL: https://issues.jboss.org/browse/JBIDE-9359
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: JBossAS
>    Affects Versions: 3.3.0.M3
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 3.3.0.M3
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list