Refine search
public void initialize(ExtensionContext context) { SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); ManagementResourceRegistration root = subsystemRegistration.registerSubsystemModel(JdrReportSubsystemDefinition.INSTANCE); root.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); if (context.isRuntimeOnlyRegistrationValid()) { root.registerOperationHandler(JdrReportRequestHandler.DEFINITION, JdrReportRequestHandler.INSTANCE); } subsystemRegistration.registerXMLElementWriter(JdrReportSubsystemParser.INSTANCE); }
public ExtensionRegistrationContext(ExtensionContext context) { this.runtimeOnlyRegistrationValid = context.isRuntimeOnlyRegistrationValid(); this.pathManager = context.getProcessType().isServer() ? Optional.of(context.getPathManager()) : Optional.empty(); }
@Override protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) { SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); subsystemRegistration.registerXMLElementWriter(JAXRSubsystemWriter.INSTANCE); ManagementResourceRegistration subsystemRoot = subsystemRegistration.registerSubsystemModel(new JAXRSubsystemRootResource()); return Collections.singleton(subsystemRoot); }
@Override public void initialize(ExtensionContext context) { // Register the remoting subsystem final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_VERSION); registration.registerXMLElementWriter(RemotingSubsystemXMLPersister::new); final boolean forDomain = context.getType() == ExtensionContext.ContextType.DOMAIN; final ResourceDefinition root = RemotingSubsystemRootResource.create(context.getProcessType(), forDomain); final ManagementResourceRegistration subsystem = registration.registerSubsystemModel(root); subsystem.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, new DescribeHandler()); subsystem.registerSubModel(RemotingEndpointResource.INSTANCE); final ManagementResourceRegistration connector = subsystem.registerSubModel(ConnectorResource.INSTANCE); connector.registerSubModel(PropertyResource.INSTANCE_CONNECTOR); final ManagementResourceRegistration sasl = connector.registerSubModel(SaslResource.INSTANCE_CONNECTOR); sasl.registerSubModel(SaslPolicyResource.INSTANCE_CONNECTOR); sasl.registerSubModel(PropertyResource.INSTANCE_CONNECTOR); final ManagementResourceRegistration httpConnector = subsystem.registerSubModel(HttpConnectorResource.INSTANCE); httpConnector.registerSubModel(PropertyResource.INSTANCE_HTTP_CONNECTOR); final ManagementResourceRegistration httpSasl = httpConnector.registerSubModel(SaslResource.INSTANCE_HTTP_CONNECTOR); httpSasl.registerSubModel(SaslPolicyResource.INSTANCE_HTTP_CONNECTOR); httpSasl.registerSubModel(PropertyResource.INSTANCE_HTTP_CONNECTOR); // remote outbound connection subsystem.registerSubModel(RemoteOutboundConnectionResourceDefinition.INSTANCE); // local outbound connection subsystem.registerSubModel(LocalOutboundConnectionResourceDefinition.INSTANCE); // (generic) outbound connection subsystem.registerSubModel(new GenericOutboundConnectionResourceDefinition()); }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(1)); subsystem.setHostCapable(); subsystem.registerSubsystemModel(new OperationTypesSubsystemResourceDefinition(context.getProcessType())); subsystem.registerXMLElementWriter(PARSER); }
/** * {@inheritDoc} * @see org.jboss.as.controller.Extension#initialize(org.jboss.as.controller.ExtensionContext) */ @Override public void initialize(ExtensionContext context) { // IMPORTANT: Management API version != xsd version! Not all Management API changes result in XSD changes SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, InfinispanSchema.CURRENT.getVersion()); // Create the path resolver handler final ResolvePathHandler resolvePathHandler; final PathManager pathManager; if (context.getProcessType().isServer()) { resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager()) .setPathAttribute(FileStoreResource.PATH) .setRelativeToAttribute(FileStoreResource.RELATIVE_TO) .build(); pathManager = context.getPathManager(); } else { resolvePathHandler = null; pathManager = null; } subsystem.registerSubsystemModel(InfinispanSubsystemRootResource.create(resolvePathHandler, pathManager, context.isRuntimeOnlyRegistrationValid())); subsystem.registerXMLElementWriter(InfinispanSubsystemXMLWriter::new); }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, SingletonModel.CURRENT.getVersion()); new SingletonResourceDefinition().register(registration); registration.registerXMLElementWriter(new SingletonXMLWriter()); }
protected static void registerResolveOperationHandler(ExtensionContext context, ManagementResourceRegistration registry) { if (context.getProcessType().isServer()) { final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager()) .setPathAttribute(PATHS.get(registry.getPathAddress().getLastElement().getValue())) .setRelativeToAttribute(PathDefinition.RELATIVE_TO) .setCheckAbsolutePath(true) .build(); registry.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler); } }
@Override public void initialize(ExtensionContext context) { if (context.getProcessType() == ProcessType.DOMAIN_SERVER) { // Do nothing. This allows an extension=cmp:add op that's really targeted // to legacy servers to work ControllerLogger.MGMT_OP_LOGGER.ignoringUnsupportedLegacyExtension(subsystemNames, extensionName); return; } else if (context.getProcessType() == ProcessType.STANDALONE_SERVER) { if (context.getRunningMode() == RunningMode.ADMIN_ONLY) { //log a message, but fall through and register the model ControllerLogger.MGMT_OP_LOGGER.removeUnsupportedLegacyExtension(subsystemNames, extensionName); } else { throw new UnsupportedOperationException(ControllerLogger.ROOT_LOGGER.unsupportedLegacyExtension(extensionName)); } } Set<ManagementResourceRegistration> subsystemRoots = initializeLegacyModel(context); for (ManagementResourceRegistration subsystemRoot : subsystemRoots) { subsystemRoot.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, new UnsupportedSubsystemDescribeHandler(extensionName)); } }
@Override public void initialize(ExtensionContext context) { if (context.getProcessType() == ProcessType.DOMAIN_SERVER) { // Do nothing. This allows an extension=cmp:add op that's really targeted // to legacy servers to work ControllerLogger.SERVER_MANAGEMENT_LOGGER.ignoringUnsupportedLegacyExtension(subsystemNames, extensionName); return; } else if (context.getProcessType() == ProcessType.STANDALONE_SERVER) { throw new UnsupportedOperationException(ControllerMessages.MESSAGES.unsupportedLegacyExtension(extensionName)); } Set<ManagementResourceRegistration> subsystemRoots = initializeLegacyModel(context); for (ManagementResourceRegistration subsystemRoot : subsystemRoots) { subsystemRoot.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, new UnsupportedSubsystemDescribeHandler(extensionName)); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { super.registerAttributes(resourceRegistration); if (this.extensionContext.isRuntimeOnlyRegistrationValid()) { for (final SimpleAttributeDefinition def : IdentityProviderMetricsOperationHandler.ATTRIBUTES) { resourceRegistration.registerMetric(def, IdentityProviderMetricsOperationHandler.INSTANCE); } } }
@Override public Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_VERSION); ManagementResourceRegistration subsystemRoot = subsystem.registerSubsystemModel(new ConfigAdminRootResource()); //no need to register transformers as whole extension was deprecated in EAP 6.1 and hasn't changed since, so 1.1.0 in 6.2+ is same as current subsystem.registerXMLElementWriter(ConfigAdminParser.INSTANCE); return Collections.singleton(subsystemRoot); } }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(1)); subsystem.setHostCapable(); subsystem.registerSubsystemModel(new BlockerSubsystemResourceDefinition(context.getProcessType().isHostController())); subsystem.registerXMLElementWriter(PARSER); }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, JGroupsModel.CURRENT.getVersion()); new JGroupsSubsystemResourceDefinition().register(new ContextualSubsystemRegistration(registration, context)); registration.registerXMLElementWriter(new JGroupsSubsystemXMLWriter()); }
protected static void registerResolveOperationHandler(ExtensionContext context, ManagementResourceRegistration registry) { if (context.getProcessType().isServer()) { final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager()) .setPathAttribute(PATHS.get(registry.getPathAddress().getLastElement().getValue())) .setRelativeToAttribute(PathDefinition.RELATIVE_TO) .setCheckAbsolutePath(true) .build(); registry.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler); } }
@Override public void initialize(ExtensionContext context) { if (context.getProcessType() == ProcessType.DOMAIN_SERVER) { // Do nothing. This allows an extension=cmp:add op that's really targeted // to legacy servers to work ControllerLogger.MGMT_OP_LOGGER.ignoringUnsupportedLegacyExtension(subsystemNames, extensionName); return; } else if (context.getProcessType() == ProcessType.STANDALONE_SERVER) { if (context.getRunningMode() == RunningMode.ADMIN_ONLY) { //log a message, but fall through and register the model ControllerLogger.MGMT_OP_LOGGER.removeUnsupportedLegacyExtension(subsystemNames, extensionName); } else { throw new UnsupportedOperationException(ControllerLogger.ROOT_LOGGER.unsupportedLegacyExtension(extensionName)); } } Set<ManagementResourceRegistration> subsystemRoots = initializeLegacyModel(context); for (ManagementResourceRegistration subsystemRoot : subsystemRoots) { subsystemRoot.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, new UnsupportedSubsystemDescribeHandler(extensionName)); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { super.registerAttributes(resourceRegistration); if (this.extensionContext.isRuntimeOnlyRegistrationValid()) { for (final SimpleAttributeDefinition def : ServiceProviderMetricsOperationHandler.ATTRIBUTES) { resourceRegistration.registerMetric(def, ServiceProviderMetricsOperationHandler.INSTANCE); } } }
/** * {@inheritDoc} */ @Override public void initialize(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(PojoResource.INSTANCE); registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); subsystem.registerXMLElementWriter(parser); }
/** {@inheritDoc} */ @Override public void initialize(final ExtensionContext context) { JSFLogger.ROOT_LOGGER.debug("Activating JSF(Mojarra) Extension"); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); subsystem.registerSubsystemModel(JSFResourceDefinition.INSTANCE); subsystem.registerXMLElementWriter(JSFSubsystemParser_1_1.INSTANCE); }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(1)); subsystem.setHostCapable(); subsystem.registerSubsystemModel(new BlockerSubsystemResourceDefinition(context.getProcessType().isHostController())); subsystem.registerXMLElementWriter(PARSER); }