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