webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSEndpointMetrics.java
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        if (context.isNormalServer()) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceRegistry registry = context.getServiceRegistry(false);
                    if (registry != null) {
                        try {
                            context.getResult().set(getEndpointMetricsFragment(operation, registry));
                        } catch (Exception e) {
                            throw new OperationFailedException(getFallbackMessage() + ": " + e.getMessage());
                        }
                    } else {
                        context.getResult().set(getFallbackMessage());
                    }
                }
            }, OperationContext.Stage.RUNTIME);
        } else {
            context.getResult().set(getFallbackMessage());
        }
    }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        if (context.isNormalServer()) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceRegistry registry = context.getServiceRegistry(false);
                    if (registry != null) {
                        try {
                            context.getResult().set(getEndpointMetricsFragment(operation, registry));
                        } catch (Exception e) {
                            throw new OperationFailedException(getFallbackMessage() + ": " + e.getMessage());
                        }
                    } else {
                        context.getResult().set(getFallbackMessage());
                    }
                }
            }, OperationContext.Stage.RUNTIME);
        } else {
            context.getResult().set(getFallbackMessage());
        }
    }
public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( context . isNormalServer ( ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceRegistry registry = context . getServiceRegistry ( false ) ; if ( registry != null ) { try { context . getResult ( ) . set ( getEndpointMetricsFragment ( operation , registry ) ) ; } catch ( Exception e ) { throw new OperationFailedException ( getFallbackMessage ( ) + ": " + e . getMessage ( ) ) ; } } else { context . getResult ( ) . set ( getFallbackMessage ( ) ) ; } } } , OperationContext . Stage . RUNTIME ) ; } else { context . getResult ( ) . set ( getFallbackMessage ( ) ) ; } }
{@inheritDoc}
{