Search in sources :

Example 41 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class RoutingProviderServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<RoutingProvider> provider = builder.provides(name);
    Service service = new FunctionalService<>(provider, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : RoutingProvider(org.wildfly.clustering.web.routing.RoutingProvider) FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Example 42 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class DistributableSingleSignOnManagerServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceController<?> installerController = this.provider.register(target.addService(name.append("installer"))).setInstance(new ChildTargetService(this.installer)).install();
    ServiceBuilder<?> builder = target.addService(name).addListener(new CascadeRemovalLifecycleListener(installerController));
    Consumer<SingleSignOnManager> manager = this.manager.register(builder).provides(name);
    Service service = new FunctionalService<>(manager, this, this.manager);
    return builder.setInstance(service);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) ChildTargetService(org.wildfly.clustering.service.ChildTargetService) SingleSignOnManager(org.wildfly.security.http.util.sso.SingleSignOnManager) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) ChildTargetService(org.wildfly.clustering.service.ChildTargetService) CascadeRemovalLifecycleListener(org.wildfly.clustering.service.CascadeRemovalLifecycleListener)

Example 43 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService 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 44 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService 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 45 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService 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)46 FunctionalService (org.wildfly.clustering.service.FunctionalService)46 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)20 ServiceName (org.jboss.msc.service.ServiceName)12 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)12 Dependency (org.wildfly.clustering.service.Dependency)5 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)5 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)5 Group (org.wildfly.clustering.group.Group)3 RouteLocator (org.wildfly.clustering.web.routing.RouteLocator)3 ClientMapping (org.jboss.as.network.ClientMapping)2 SessionIdentifierCodec (org.jboss.as.web.session.SessionIdentifierCodec)2 ModClusterService (org.jboss.modcluster.ModClusterService)2 ServiceProviderRegistry (org.wildfly.clustering.provider.ServiceProviderRegistry)2 CommandDispatcherFactory (org.wildfly.clustering.spi.dispatcher.CommandDispatcherFactory)2 SessionManagerFactory (org.wildfly.clustering.web.session.SessionManagerFactory)2 SessionManagerFactory (io.undertow.servlet.api.SessionManagerFactory)1 ExecutorService (java.util.concurrent.ExecutorService)1 OpenAPI (org.eclipse.microprofile.openapi.models.OpenAPI)1 Cache (org.infinispan.Cache)1