use of org.wildfly.clustering.service.AsyncServiceConfigurator 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.AsyncServiceConfigurator in project wildfly by wildfly.
the class ContainerEventHandlerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<ModClusterService> modClusterService = this.configuration.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(modClusterService, Function.identity(), this, this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.AsyncServiceConfigurator 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.AsyncServiceConfigurator in project wildfly by wildfly.
the class RegistryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<Registry<K, V>> registry = new CompositeDependency(this.factory, this.entry).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(registry, Function.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.AsyncServiceConfigurator in project wildfly by wildfly.
the class CacheContainerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<EmbeddedCacheManager> container = new CompositeDependency(this.configuration).register(builder).provides(this.names);
Service service = new FunctionalService<>(container, this, this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Aggregations