@Process(actionType = ModifyEndpointConfiguration.class)
    public void modifyEndpointConfiguration(final ModifyEndpointConfiguration action, final Dispatcher.Channel channel) {
        operationDelegate.onSaveResource(ENDPOINT_CONFIGURATION_ADDRESS, null, action.getChangedValues(),
                new CrudOperationDelegate.Callback() {
                    @Override
                    public void onSuccess(final AddressTemplate addressTemplate, final String name) {
                        final ModelNode op = readEndpointConfiguration();
                        dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() {
                            @Override
                            public void onFailure(Throwable caught) {
                                channel.nack(caught);
                            }

                            @Override
                            public void onSuccess(DMRResponse dmrResponse) {
                                ModelNode response = dmrResponse.get();
                                if (response.isFailure()) {
                                    channel.nack(new RuntimeException("Failed to read " + addressTemplate + " using " + op + ": " +
                                            response.getFailureDescription()));
                                } else {
                                    endpointConfiguration = response.get(RESULT);
                                    channel.ack();
                                }
                            }
                        });
                    }

                    @Override
                    public void onFailure(AddressTemplate addressTemplate, String name, Throwable t) {
                        channel.nack(t);
                    }
                });
    }
@ Process ( actionType = ModifyEndpointConfiguration . class ) public void modifyEndpointConfiguration ( final ModifyEndpointConfiguration action , final Dispatcher . Channel channel ) { operationDelegate . onSaveResource ( ENDPOINT_CONFIGURATION_ADDRESS , null , action . getChangedValues ( ) , new CrudOperationDelegate . Callback ( ) { @ Override public void onSuccess ( final AddressTemplate addressTemplate , final String name ) { final ModelNode op = readEndpointConfiguration ( ) ; dispatcher . execute ( new DMRAction ( op ) , new AsyncCallback < DMRResponse > ( ) { @ Override public void onFailure ( Throwable caught ) { channel . nack ( caught ) ; } @ Override public void onSuccess ( DMRResponse dmrResponse ) { ModelNode response = dmrResponse . get ( ) ; if ( response . isFailure ( ) ) { channel . nack ( new RuntimeException ( "Failed to read " + addressTemplate + " using " + op + ": " + response . getFailureDescription ( ) ) ) ; } else { endpointConfiguration = response . get ( RESULT ) ; channel . ack ( ) ; } } } ) ; } @ Override public void onFailure ( AddressTemplate addressTemplate , String name , Throwable t ) { channel . nack ( t ) ; } } ) ; }
------------------------------------------------------ endpoint configuration