[jboss-as7-dev] AbstractAddStepHandler handling

Emanuel Muckenhuber emuckenh at redhat.com
Fri Jul 22 08:56:15 EDT 2011


Hmm, ok good point - i will add that to the docs.

The AbstractAddStepHandler is a nice util if this scheme works for you. 
However we also find cases where this default behavior does not apply, 
so it's hard to generalize. That's why i would rather suggest you create 
your own subclass, before you get a headache trying to use this one :)

On 07/22/2011 02:44 PM, David Bosschaert wrote:
> Thanks Emanuel,
>
> I was trying to stay as close as possible to [1] but this is of course a
> solution.
> We might update the doc to mention it...
>
> Cheers,
>
> David
>
> [1] https://docs.jboss.org/author/display/AS7/Extending+JBoss+AS+7
>
> On 22/07/2011 13:07, Emanuel Muckenhuber wrote:
>> There is no need to subclass this handler. I'd suggest you use the
>> OperationStepHandler interface directly and add the 5 lines this handler
>> does. At least that's what i'm doing.
>>
>> On 07/22/2011 01:03 PM, David Bosschaert wrote:
>>> Hi all,
>>>
>>> While I'm writing a bunch of AbstractAddStepHandler subclasses for the
>>> parsing of my subsystem I was thinking the following...
>>>
>>> Typically these have the following methods:
>>> protected void populateModel(ModelNode operation, ModelNode model) {
>>> // parse data out of operation and put into model
>>> }
>>>
>>> protected void performRuntime(OperationContext context, ModelNode
>>> operation, ModelNode model,...) {
>>> // take action, which typically means:
>>> // read data out of model and do something with it
>>> }
>>>
>>> This typically means that I have to parse the stuff in performRuntime
>>> again (from ModelNode->native objects), either out of model or reparse
>>> the operation. It would be nice if the result of the parsing in
>>> populateModel could be cached somehow so that you could re-use it in
>>> performRuntime?
>>>
>>> Any ideas here? Is this already possible? Or should I be doing things
>>> differently?
>>>
>>> Cheers,
>>>
>>> David
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>



More information about the jboss-as7-dev mailing list