private static ModelNode createAddOperation() { return createOperation(ADD); }
private RemotingConnectorResource() { super(REMOTE_CONNECTOR_CONFIG_PATH, JMXExtension.getResourceDescriptionResolver(CommonAttributes.REMOTING_CONNECTOR), RemotingConnectorAdd.INSTANCE, RemotingConnectorRemove.INSTANCE); }
/** * {@inheritDoc} */ @Override public void initialize(ExtensionContext context) { final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); //This is ugly but for now we don't want to make the audit logger easily available to all extensions ManagedAuditLogger auditLogger = (ManagedAuditLogger)((ExtensionContextImpl)context).getAuditLogger(false, true); //This is ugly but for now we don't want to make the authorizer easily available to all extensions JmxAuthorizer authorizer = ((ExtensionContextImpl)context).getAuthorizer(); registration.registerSubsystemModel(JMXSubsystemRootResource.create(auditLogger, authorizer)); registration.registerXMLElementWriter(writer); if (context.isRegisterTransformers()) { registerTransformers1_0_0(registration); registerTransformers1_1_0(registration); } }
private void registerTransformers1_1_0(SubsystemRegistration registration) { ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance(); rejectDefinedCoreMBeansSensitivity(builder); registerRejectAuditLogTransformers(builder); TransformationDescription.Tools.register(builder.build(), registration, ModelVersion.create(1, 1, 0)); }
/** * {@inheritDoc} */ @Override public void initialize(ExtensionContext context) { final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); registration.registerSubsystemModel(new JMXSubsystemRootResource()); registration.registerXMLElementWriter(writer); if (context.isRegisterTransformers()) { registerTransformers1_0_0(registration); } }
private void registerTransformers1_0_0(SubsystemRegistration registration) { rejectDefinedCoreMBeansSensitivity(builder); builder.setCustomResourceTransformer(new ResourceTransformer() { @Override .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, RemotingConnectorResource.USE_MANAGEMENT_ENDPOINT); registerRejectAuditLogTransformers(builder);
private RemotingConnectorResource() { super(REMOTE_CONNECTOR_CONFIG_PATH, JMXExtension.getResourceDescriptionResolver(CommonAttributes.REMOTING_CONNECTOR), RemotingConnectorAdd.INSTANCE, RemotingConnectorRemove.INSTANCE); }
private static ModelNode createAddOperation() { return createOperation(ADD); }
JMXSubsystemRootResource() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME), JMXExtension.getResourceDescriptionResolver(JMXExtension.SUBSYSTEM_NAME), JMXSubsystemAdd.INSTANCE, JMXSubsystemRemove.INSTANCE); }
private static ModelNode createAddOperation() { return createOperation(ADD); }
private JMXSubsystemRootResource(ManagedAuditLogger auditLogger, JmxAuthorizer authorizer) { super(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver(JMXExtension.SUBSYSTEM_NAME), new JMXSubsystemAdd(auditLogger, authorizer), JMXSubsystemRemove.INSTANCE); this.accessConstraints = JMXExtension.JMX_SENSITIVITY_DEF.wrapAsList(); this.auditLogger = auditLogger; this.authorizer = authorizer; }
public JmxAuditLogHandlerReferenceResourceDefinition(ManagedAuditLogger auditLogger) { //Make a remove reload required. Handlers using more complex formatters in the future will not like being stopped and started at runtime super(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver("audit-log.handler"), new AuditLogHandlerReferenceAddHandler(auditLogger), new AuditLogHandlerReferenceRemoveHandler(auditLogger)); }
public JmxAuditLoggerResourceDefinition(final ManagedAuditLogger auditLogger) { super(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver("audit-log"), new AuditLoggerAddHandler(auditLogger), new AuditLoggerRemoveHandler(auditLogger)); this.auditLogger = auditLogger; }
ExposeModelResource(String modelName, SimpleAttributeDefinition domainName, SimpleAttributeDefinition...otherAttributes) { super(PathElement.pathElement(CommonAttributes.EXPOSE_MODEL, modelName), JMXExtension.getResourceDescriptionResolver(CommonAttributes.EXPOSE_MODEL + "." + modelName), new ShowModelAdd(domainName, otherAttributes), ShowModelRemove.INSTANCE); this.domainName = domainName; }
public JmxAuditLogHandlerReferenceResourceDefinition(ManagedAuditLogger auditLogger) { //Make a remove reload required. Handlers using more complex formatters in the future will not like being stopped and started at runtime super(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver("audit-log.handler"), new AuditLogHandlerReferenceAddHandler(auditLogger), new AuditLogHandlerReferenceRemoveHandler(auditLogger)); }
public JmxAuditLoggerResourceDefinition(final ManagedAuditLogger auditLogger) { super(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver("audit-log"), new AuditLoggerAddHandler(auditLogger), new AuditLoggerRemoveHandler(auditLogger)); this.auditLogger = auditLogger; }
ExposeModelResource(PathElement pathElement, ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, SimpleAttributeDefinition domainName, SimpleAttributeDefinition...otherAttributes) { super(pathElement, JMXExtension.getResourceDescriptionResolver(CommonAttributes.EXPOSE_MODEL + "." + pathElement.getValue()), new ShowModelAdd(auditLoggerInfo, authorizer, domainName, otherAttributes), new ShowModelRemove(auditLoggerInfo, authorizer)); this.auditLoggerInfo = auditLoggerInfo; this.authorizer = authorizer; this.domainName = domainName; }
ExposeModelResource(PathElement pathElement, ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostInfoAccessor, SimpleAttributeDefinition domainName, SimpleAttributeDefinition...otherAttributes) { super(pathElement, JMXExtension.getResourceDescriptionResolver(CommonAttributes.EXPOSE_MODEL + "." + pathElement.getValue()), new ShowModelAdd(auditLoggerInfo, authorizer, securityIdentitySupplier, domainName, hostInfoAccessor, otherAttributes), new ShowModelRemove(auditLoggerInfo, authorizer, securityIdentitySupplier, hostInfoAccessor)); this.auditLoggerInfo = auditLoggerInfo; this.authorizer = authorizer; this.securityIdentitySupplier = securityIdentitySupplier; this.domainName = domainName; this.hostInfoAccessor = hostInfoAccessor; }
private RemotingConnectorResource() { super(new SimpleResourceDefinition.Parameters(REMOTE_CONNECTOR_CONFIG_PATH, JMXExtension.getResourceDescriptionResolver(CommonAttributes.REMOTING_CONNECTOR)) .setAddHandler(RemotingConnectorAdd.INSTANCE) .setRemoveHandler(RemotingConnectorRemove.INSTANCE) .setCapabilities(REMOTE_JMX_CAPABILITY)); }
private JMXSubsystemRootResource(ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostInfoAccessor) { super(new Parameters(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver(JMXExtension.SUBSYSTEM_NAME)) .setAddHandler(new JMXSubsystemAdd(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor)) .setRemoveHandler(new JMXSubsystemRemove(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor)) .addCapabilities(JMX_CAPABILITY) .setAccessConstraints(JMXExtension.JMX_SENSITIVITY_DEF)); this.auditLogger = auditLogger; this.authorizer = authorizer; this.securityIdentitySupplier = securityIdentitySupplier; this.hostInfoAccessor = hostInfoAccessor; }