Search in sources :

Example 71 with Service

use of org.jboss.msc.Service in project wildfly by wildfly.

the class SSOManagerServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<SSOManager<A, D, S, L, Batch>> manager = new CompositeDependency(this.factory, this.generator, this.loader).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(manager, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : SSOManager(org.wildfly.clustering.web.sso.SSOManager) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 72 with Service

use of org.jboss.msc.Service in project wildfly by wildfly.

the class DistributableSessionIdentifierCodecServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    this.configurator.build(target).install();
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<SessionIdentifierCodec> codec = builder.provides(this.getServiceName());
    Supplier<RouteLocator> locator = builder.requires(this.configurator.getServiceName());
    Service service = new FunctionalService<>(codec, this, locator);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : RouteLocator(org.wildfly.clustering.web.routing.RouteLocator) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) SessionIdentifierCodec(org.jboss.as.web.session.SessionIdentifierCodec)

Example 73 with Service

use of org.jboss.msc.Service in project wildfly by wildfly.

the class DistributableCacheFactoryBuilderServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<DistributableCacheFactoryBuilder<K, V>> cacheFactoryBuilder = builder.provides(name);
    Service service = Service.newInstance(cacheFactoryBuilder, this);
    return builder.setInstance(service);
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) Service(org.jboss.msc.Service)

Example 74 with Service

use of org.jboss.msc.Service in project wildfly by wildfly.

the class SimpleCacheFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<CacheFactory<K, V>> factory = this.environment.register(builder).provides(name);
    Service service = Service.newInstance(factory, this);
    return builder.setInstance(service);
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) Service(org.jboss.msc.Service) ServerEnvironmentService(org.jboss.as.server.ServerEnvironmentService) CacheFactory(org.jboss.as.ejb3.cache.CacheFactory)

Example 75 with Service

use of org.jboss.msc.Service in project wildfly by wildfly.

the class OpenAPIModelServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<OpenAPI> model = new CompositeDependency(this.host, this.info).register(builder).provides(name);
    Service service = new FunctionalService<>(model, Function.identity(), this);
    return builder.setInstance(service);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) Service(org.jboss.msc.Service) FunctionalService(org.wildfly.clustering.service.FunctionalService) UndertowDeploymentInfoService(org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService) UndertowService(org.wildfly.extension.undertow.UndertowService) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) OpenAPI(org.eclipse.microprofile.openapi.models.OpenAPI)

Aggregations

Service (org.jboss.msc.Service)76 FunctionalService (org.wildfly.clustering.service.FunctionalService)46 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)26 ServiceName (org.jboss.msc.service.ServiceName)23 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)13 Dependency (org.wildfly.clustering.service.Dependency)7 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)7 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)7 StartContext (org.jboss.msc.service.StartContext)4 ExecutorService (java.util.concurrent.ExecutorService)3 CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)3 ServerEnvironmentService (org.jboss.as.server.ServerEnvironmentService)3 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)3 ServiceTarget (org.jboss.msc.service.ServiceTarget)3 StopContext (org.jboss.msc.service.StopContext)3 RouteLocator (org.wildfly.clustering.web.routing.RouteLocator)3 Supplier (java.util.function.Supplier)2 CapabilityServiceConfigurator (org.jboss.as.clustering.controller.CapabilityServiceConfigurator)2 ComponentDescription (org.jboss.as.ee.component.ComponentDescription)2 CacheFactoryBuilder (org.jboss.as.ejb3.cache.CacheFactoryBuilder)2