@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(serviceName); ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream print = new PrintStream(out); service.getServiceContainer().dumpServices(print); print.flush(); context.getResult().set(new String(out.toByteArray(), StandardCharsets.UTF_8)); } }, OperationContext.Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(serviceName); ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream print = new PrintStream(out); service.getServiceContainer().dumpServices(print); print.flush(); context.getResult().set(new String(out.toByteArray(), StandardCharsets.UTF_8)); } }, OperationContext.Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(Services.JBOSS_AS); ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream print = new PrintStream(out); service.getServiceContainer().dumpServices(print); print.flush(); context.getResult().set(new String(out.toByteArray())); context.stepCompleted(); } }, OperationContext.Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(Services.JBOSS_AS); ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream print = new PrintStream(out); service.getServiceContainer().dumpServices(print); print.flush(); context.getResult().set(new String(out.toByteArray())); context.stepCompleted(); } }, OperationContext.Stage.RUNTIME);