[jboss-jira] [JBoss JIRA] (AS7-4821) Improve API for defining OperationHandlers

Tomaz Cerar (JIRA) jira-events at lists.jboss.org
Tue May 15 11:36:19 EDT 2012


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

Tomaz Cerar commented on AS7-4821:
----------------------------------

David I agree with you, my idea was just to simplify the way we register operations, so users do not need to write DescriptionProvider's 
we have done this for resources and attributes with ResourceDefinition & AttributeDefinition but operations ware left out :-(
in spirit of converting all subsystems to ResourceDefinition/AttributeDefinition it would be nice to present users friendlier api also for operations.

my current idea is implemented here:
https://github.com/ctomc/jboss-as/commit/b5a23ab5c70a67f37c644aa5811f6fad00127c74

it adds OperationDefinition (so it is similar to RD and AD)
and four methods to ManagementResourceRegistration two for simpler adding of operation by name and attribues and two that enable usage of OperationDefinition
{code:java}
void registerOperationHandler(String operationName, OperationStepHandler handler, ModelType replyType, ModelType replyValueType, AttributeDefinition ... attributes);

void registerOperationHandler(String operationName, OperationStepHandler handler, AttributeDefinition ... attributes);

void registerOperationHandler(OperationDefinition definition,OperationStepHandler handler);

void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler,boolean inherited);
{code}

this i think can be added without to much disturbance and will allow to write prettier management code :)

wdyt?
                
> Improve API for defining OperationHandlers
> ------------------------------------------
>
>                 Key: AS7-4821
>                 URL: https://issues.jboss.org/browse/AS7-4821
>             Project: Application Server 7
>          Issue Type: Enhancement
>          Components: Domain Management
>    Affects Versions: 7.1.0.Final, 7.1.1.Final, 7.1.2.Final (EAP)
>            Reporter: Tomaz Cerar
>            Assignee: Tomaz Cerar
>             Fix For: 7.2.0.Alpha1
>
>
> Current api for registering operations is cumbersome as it still requires manual writing of DescriptionProvider for every operation you register.
> there should be easier way of defining operations that take some parameters

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list