[jboss-as7-dev] AbstractAddStepHandler handling
Emanuel Muckenhuber
emuckenh at redhat.com
Fri Jul 22 08:07:38 EDT 2011
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
More information about the jboss-as7-dev
mailing list