@Override protected Resource createResource(final OperationContext context) { if (pathManager == null) { return super.createResource(context); } final Resource resource = new LoggingResource(pathManager); context.addResource(PathAddress.EMPTY_ADDRESS, resource); return resource; }
@Override protected Resource createResource(OperationContext context, ModelNode operation) { if (context.isDefaultRequiresRuntime()) { // Wrap a standard Resource impl in our custom variant that understands runtime-only // children Resource delegate = Resource.Factory.create(); Resource result = new ModClusterResource(delegate, context.getCurrentAddressValue()); context.addResource(PathAddress.EMPTY_ADDRESS, result); return result; } else { return super.createResource(context, operation); } }
@Override protected Resource createResource(OperationContext context) { resource = new OSGiRuntimeResource(); context.addResource(PathAddress.EMPTY_ADDRESS, resource); return resource; }