use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class ChannelCommandDispatcherFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
this.loader = builder.requires(Services.JBOSS_SERVICE_MODULE_LOADER);
Consumer<CommandDispatcherFactory> factory = new CompositeDependency(this.channel, this.channelFactory, this.module).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(factory, Functions.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class UndertowEventHandlerAdapterServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
new CompositeDependency(this.service, this.listener, this.suspendController).register(builder);
this.eventHandler = builder.requires(ProxyConfigurationResourceDefinition.Capability.SERVICE.getDefinition().getCapabilityServiceName(proxyName));
Service service = new UndertowEventHandlerAdapterService(this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class DistributableCacheFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
this.configurator.build(target).install();
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<CacheFactory<K, V>> factory = new CompositeDependency(this.factory, this.tsr).register(builder).provides(name);
Service service = Service.newInstance(factory, this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class CacheServiceProviderRegistryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<ServiceProviderRegistry<T>> registry = new CompositeDependency(this.cache, this.dispatcherFactory, this.group).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(registry, Functions.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class OpenAPIHttpHandlerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
new CompositeDependency(this.model, this.host).register(builder);
return builder.setInstance(this);
}
Aggregations