@Override public void registerOperations(ManagementResourceRegistration resourceRegistration) { super.registerOperations(resourceRegistration); super.registerAddOperation( resourceRegistration, getAddHandler(), OperationEntry.Flag.RESTART_NONE); super.registerRemoveOperation( resourceRegistration, new ListenerRemoveHandler(getAddHandler()), OperationEntry.Flag.RESTART_NONE); }
/** * {@inheritDoc} Registers an add operation handler or a remove operation handler if one was * provided to the constructor. */ @Override public void registerOperations(ManagementResourceRegistration resourceRegistration) { super.registerOperations(resourceRegistration); // We always need to add a 'describe' operation for root resource resourceRegistration.registerOperationHandler( GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); }
@Override public void registerAttributes(ManagementResourceRegistration registry) { super.registerAttributes(registry); for (SimpleAttributeDefinition attr : ATTRIBUTES) { if (!attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { if (runtimeOnly) { AttributeDefinition readOnlyRuntimeAttr = create(attr).setStorageRuntime().build(); registry.registerReadOnlyAttribute( readOnlyRuntimeAttr, QueueReadAttributeHandler.RUNTIME_INSTANCE); } else { registry.registerReadOnlyAttribute(attr, null); } } } for (AttributeDefinition attr : READONLY_ATTRIBUTES) { registry.registerReadOnlyAttribute(attr, QueueReadAttributeHandler.INSTANCE); } for (AttributeDefinition metric : METRICS) { registry.registerMetric(metric, QueueReadAttributeHandler.INSTANCE); } }
@Override public void registerOperations(ManagementResourceRegistration registry) { super.registerOperations(registry); QueueControlHandler.INSTANCE.registerOperations(registry, getResourceDescriptionResolver()); }