commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar (JIRA)" <>
Subject [jira] Resolved: (SCXML-27) Improve possibility to extending (subclassing) the default semantics
Date Mon, 02 Oct 2006 15:58:20 GMT
     [ ]

Rahul Akolkar resolved SCXML-27.

    Resolution: Won't Fix

Its probably the natural place to put the compiled pattern, but subclassing the Transition
class probably requires changes in other places (we generally do not recommend subclassing
anything in the model package, since it can have collateral in the digester, semantics etc.)

Might be best to maintain an independent cache here.

> Improve possibility to extending (subclassing) the default semantics
> --------------------------------------------------------------------
>                 Key: SCXML-27
>                 URL:
>             Project: Commons SCXML
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Hallvard Trætteberg
> I've extended the default SCXML semantics (subclassed SCXMLSemanticsImpl) with a more
flexible event matching method. However, this required copying a lot of code from SCXMLSemanticsImpl,
just to replace the event matching method. The problem was that the eventMatch method takes
String and Set arguments, with no way to get at the Transition who's event is to be tested.
I copied the relevant code and replaced eventMatch(String,Set) with eventMatch(Transition,Set),
to make it more flexible. I ask that this change is made to SCXMLSemanticsImpl, to better
support overriding.
> The flexibility I've added is to use regular expressions for matching, and since this
happens often, I wanted to cache the compiled pattern. The natural place to do this is the
Transition, so I subclassed the Transition class, included a field for holding the compiled
pattern and made sure to use this subclass whenever a regexp was needed. Then in the modified
eventMatch code, I check whether the Transition is of this subclass and used the cache to
improve performance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message