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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations