[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] Updated: (SCXML-47) Provide a state machine support class to
From:       "Rahul Akolkar (JIRA)" <jira () apache ! org>
Date:       2007-11-30 23:50:43
Message-ID: 19644829.1196466643051.JavaMail.jira () brutus
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/SCXML-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Rahul Akolkar updated SCXML-47:
-------------------------------

    Fix Version/s:     (was: 0.7)
                   0.8

> Provide a state machine support class to allow for delegation.
> --------------------------------------------------------------
> 
> Key: SCXML-47
> URL: https://issues.apache.org/jira/browse/SCXML-47
> Project: Commons SCXML
> Issue Type: Improvement
> Affects Versions: 0.6
> Reporter: Michael Heuer
> Priority: Minor
> Fix For: 0.8
> 
> Attachments: additional-tests.tar.gz, state-machine-support-src.tar.gz
> 
> 
> This is not completely thought out yet, but if folks like the idea I might persue \
> it further. I would like to use AbstractStateMachine but cannot extend from it:
> class B extends A /*, AbstractStateMachine */ {
> // copy source from AbstractStateMachine here
> }
> I propose here a StateMachineSupport class that provides for use by subclassing and \
> for use by delegation.  The constructors are a little messy, but in the end I have \
> public class StateMachineSupport { // use by subclassing
> protected StateMachineSupport(...) {
> }
> // use by delegation
> public StateMachineSupport(Object delegator, ...) {
> }
> // ... methods from AbstractStateMachine
> }
> public abstract class AbstractStateMachine extends StateMachineSupport {
> protected AbstractStateMachine(...) {
> super(...);
> }
> }
> // use by subclassing
> class ConcreteStateMachine extends AbstractStateMachine {
> ConcreteStateMachine() {
> super(..."stopwatch.xml");
> }
> public void reset() { ... }
> public void running() { ... }
> public void paused() { ... }
> public void stopped() { ... }
> }
> // use by delegation
> class DelegatingStateMachine extends SomethingElse {
> StateMachineSupport delegate;
> DelegatingStateMachine() {
> delegate = new StateMachineSupport(this, ..."stopwatch.xml");
> }
> public void reset() { ... }
> public void running() { ... }
> public void paused() { ... }
> public void stopped() { ... }
> }
> StateMachineSupport.java, AbstractStateMachine2.java, StateMachineSupportTest.java, \
> and AbstractStateMachine2Test.java attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic