Search in sources :

Example 1 with ResourceServiceBuilderFactory

use of org.jboss.as.clustering.controller.ResourceServiceBuilderFactory in project wildfly by wildfly.

the class ForkResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addCapabilities(Capability.class).addCapabilities(CLUSTERING_CAPABILITIES.values());
    ResourceServiceBuilderFactory<ChannelFactory> builderFactory = address -> new ForkChannelFactoryBuilder(Capability.FORK_CHANNEL_FACTORY.getServiceName(address), address.getParent().getLastElement().getValue());
    ResourceServiceHandler handler = new ForkServiceHandler(builderFactory);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    new ProtocolRegistration(builderFactory, new ForkProtocolResourceRegistrationHandler()).register(registration);
}
Also used : UnaryRequirement(org.wildfly.clustering.service.UnaryRequirement) EnumMap(java.util.EnumMap) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) JGroupsRequirement(org.wildfly.clustering.jgroups.spi.JGroupsRequirement) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor) PathElement(org.jboss.as.controller.PathElement) ResourceServiceBuilderFactory(org.jboss.as.clustering.controller.ResourceServiceBuilderFactory) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ClusteringRequirement(org.wildfly.clustering.spi.ClusteringRequirement) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) UnaryRequirementCapability(org.jboss.as.clustering.controller.UnaryRequirementCapability) Map(java.util.Map) ChannelFactory(org.wildfly.clustering.jgroups.spi.ChannelFactory) ChildResourceDefinition(org.jboss.as.clustering.controller.ChildResourceDefinition) CapabilityProvider(org.jboss.as.clustering.controller.CapabilityProvider) EnumSet(java.util.EnumSet) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) UnaryRequirementCapability(org.jboss.as.clustering.controller.UnaryRequirementCapability) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ChannelFactory(org.wildfly.clustering.jgroups.spi.ChannelFactory) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

EnumMap (java.util.EnumMap)1 EnumSet (java.util.EnumSet)1 Map (java.util.Map)1 CapabilityProvider (org.jboss.as.clustering.controller.CapabilityProvider)1 ChildResourceDefinition (org.jboss.as.clustering.controller.ChildResourceDefinition)1 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)1 ResourceServiceBuilderFactory (org.jboss.as.clustering.controller.ResourceServiceBuilderFactory)1 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)1 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)1 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)1 PathElement (org.jboss.as.controller.PathElement)1 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)1 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)1 JGroupsRequirement (org.wildfly.clustering.jgroups.spi.JGroupsRequirement)1 UnaryRequirement (org.wildfly.clustering.service.UnaryRequirement)1 ClusteringRequirement (org.wildfly.clustering.spi.ClusteringRequirement)1