Search in sources :

Example 36 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class JaxrsExtension method initialize.

/**
     * {@inheritDoc}
     */
@Override
public void initialize(final ExtensionContext context) {
    JAXRS_LOGGER.debug("Activating JAX-RS Extension");
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(JaxrsSubsystemDefinition.INSTANCE);
    registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    ManagementResourceRegistration jaxrsResReg = subsystem.registerDeploymentModel(JaxrsDeploymentDefinition.INSTANCE);
    jaxrsResReg.registerSubModel(DeploymentRestResourcesDefintion.INSTANCE);
    subsystem.registerXMLElementWriter(parser);
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 37 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class NamingExtension method initialize.

/**
     * {@inheritDoc}
     */
@Override
public void initialize(ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new NamingSubsystemRootResourceDefinition());
    registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    registration.registerSubModel(NamingBindingResourceDefinition.INSTANCE);
    registration.registerSubModel(RemoteNamingResourceDefinition.INSTANCE);
    if (context.isRuntimeOnlyRegistrationValid()) {
        registration.registerOperationHandler(NamingSubsystemRootResourceDefinition.JNDI_VIEW, JndiViewOperation.INSTANCE, false);
    }
    subsystem.registerXMLElementWriter(NamingSubsystemXMLPersister.INSTANCE);
    if (context.isRegisterTransformers()) {
        registerTransformers(subsystem);
    }
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 38 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class JSFExtension method initialize.

/** {@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_0.INSTANCE);
}
Also used : SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 39 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class ConfigAdminExtension method initializeLegacyModel.

@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);
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 40 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class MessagingExtension method initializeLegacyModel.

@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    subsystem.registerXMLElementWriter(MessagingXMLWriter.INSTANCE);
    // Root resource
    final ManagementResourceRegistration rootRegistration = subsystem.registerSubsystemModel(MessagingSubsystemRootResourceDefinition.INSTANCE);
    // HQ servers
    final ManagementResourceRegistration serverRegistration = rootRegistration.registerSubModel(HornetQServerResourceDefinition.INSTANCE);
    // Address settings
    serverRegistration.registerSubModel(AddressSettingDefinition.INSTANCE);
    // Broadcast groups
    serverRegistration.registerSubModel(BroadcastGroupDefinition.INSTANCE);
    // Discovery groups
    serverRegistration.registerSubModel(DiscoveryGroupDefinition.INSTANCE);
    // Diverts
    serverRegistration.registerSubModel(DivertDefinition.INSTANCE);
    // Core queues
    serverRegistration.registerSubModel(QueueDefinition.INSTANCE);
    // Acceptors
    serverRegistration.registerSubModel(HTTPAcceptorDefinition.INSTANCE);
    serverRegistration.registerSubModel(GenericTransportDefinition.ACCEPTOR_INSTANCE);
    serverRegistration.registerSubModel(RemoteTransportDefinition.ACCEPTOR_INSTANCE);
    serverRegistration.registerSubModel(InVMTransportDefinition.ACCEPTOR_INSTANCE);
    // Connectors
    serverRegistration.registerSubModel(HTTPConnectorDefinition.INSTANCE);
    serverRegistration.registerSubModel(GenericTransportDefinition.CONNECTOR_INSTANCE);
    serverRegistration.registerSubModel(RemoteTransportDefinition.CONNECTOR_INSTANCE);
    serverRegistration.registerSubModel(InVMTransportDefinition.CONNECTOR_INSTANCE);
    // Bridges
    serverRegistration.registerSubModel(BridgeDefinition.INSTANCE);
    // Cluster connections
    serverRegistration.registerSubModel(ClusterConnectionDefinition.INSTANCE);
    // Grouping Handler
    serverRegistration.registerSubModel(GroupingHandlerDefinition.INSTANCE);
    // Connector services
    serverRegistration.registerSubModel(ConnectorServiceDefinition.INSTANCE);
    //todo, shouldn't we leverage Path service from AS? see: package org.jboss.as.controller.services.path
    for (final String path : PathDefinition.PATHS.keySet()) {
        ManagementResourceRegistration binding = serverRegistration.registerSubModel(new PathDefinition(pathElement(ModelDescriptionConstants.PATH, path)));
        // Create the path resolver operation
        if (context.getProcessType().isServer()) {
            final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager()).setPathAttribute(PathDefinition.PATHS.get(path)).setRelativeToAttribute(PathDefinition.RELATIVE_TO).build();
            binding.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
        }
    }
    // Connection factories
    serverRegistration.registerSubModel(ConnectionFactoryDefinition.INSTANCE);
    // Resource Adapter Pooled connection factories
    serverRegistration.registerSubModel(PooledConnectionFactoryDefinition.INSTANCE);
    // JMS Queues
    serverRegistration.registerSubModel(JMSQueueDefinition.INSTANCE);
    // JMS Topics
    serverRegistration.registerSubModel(JMSTopicDefinition.INSTANCE);
    serverRegistration.registerSubModel(SecuritySettingDefinition.INSTANCE);
    // JMS Bridges
    rootRegistration.registerSubModel(JMSBridgeDefinition.INSTANCE);
    if (context.isRegisterTransformers()) {
        MessagingTransformers.registerTransformers(subsystem);
    }
    return Collections.singleton(rootRegistration);
}
Also used : ResolvePathHandler(org.jboss.as.controller.services.path.ResolvePathHandler) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Aggregations

SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)42 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)32 RequirementCapability (org.jboss.as.clustering.controller.RequirementCapability)3 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)3 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)3 SubsystemResourceDefinition (org.jboss.as.clustering.controller.SubsystemResourceDefinition)3 ModelVersion (org.jboss.as.controller.ModelVersion)3 PathElement (org.jboss.as.controller.PathElement)3 SimpleResourceDefinition (org.jboss.as.controller.SimpleResourceDefinition)3 ModelDescriptionConstants (org.jboss.as.controller.descriptions.ModelDescriptionConstants)3 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)3 TransformationDescription (org.jboss.as.controller.transform.description.TransformationDescription)3 TransformationDescriptionBuilder (org.jboss.as.controller.transform.description.TransformationDescriptionBuilder)3 EnumMap (java.util.EnumMap)2 EnumSet (java.util.EnumSet)2 Map (java.util.Map)2 CapabilityReference (org.jboss.as.clustering.controller.CapabilityReference)2 DeploymentChainContributingResourceRegistration (org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration)2 CapabilityReferenceRecorder (org.jboss.as.controller.CapabilityReferenceRecorder)2 ResourceDefinition (org.jboss.as.controller.ResourceDefinition)2