public static JMXSubsystemRootResource create(ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostInfoAccessor) { return new JMXSubsystemRootResource(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor); }
/** * {@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); } }
/** * {@inheritDoc} */ @Override public void initialize(ExtensionContext context) { final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_VERSION); //This subsystem should be runnable on a host registration.setHostCapable(); //This is ugly but for now we don't want to make the audit logger easily available to all extensions @SuppressWarnings("deprecation") ManagedAuditLogger auditLogger = (ManagedAuditLogger)((ExtensionContextSupplement)context).getAuditLogger(false, true); //This is ugly but for now we don't want to make the authorizer easily available to all extensions @SuppressWarnings("deprecation") JmxAuthorizer authorizer = ((ExtensionContextSupplement)context).getAuthorizer(); //This is ugly but for now we don't want to make the securityIdentitySupplier easily available to all extensions @SuppressWarnings("deprecation") Supplier<SecurityIdentity> securityIdentitySupplier = ((ExtensionContextSupplement)context).getSecurityIdentitySupplier(); //This is ugly but for now we don't want to make the hostInfoAccessor easily available to all extensions @SuppressWarnings("deprecation") RuntimeHostControllerInfoAccessor hostInfoAccessor = ((ExtensionContextSupplement)context).getHostControllerInfoAccessor(); registration.registerSubsystemModel(JMXSubsystemRootResource.create(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor)); registration.registerXMLElementWriter(JMXSubsystemWriter::new); }
public static JMXSubsystemRootResource create(ManagedAuditLogger auditLogger, JmxAuthorizer authorizer) { return new JMXSubsystemRootResource(auditLogger, authorizer); }
/** * {@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); } }