use of org.wildfly.clustering.service.AsyncServiceConfigurator in project wildfly by wildfly.
the class ProtocolDefaultsServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(SERVICE_NAME).build(target);
Consumer<ProtocolDefaults> defaults = builder.provides(SERVICE_NAME);
Service service = new FunctionalService<>(defaults, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.AsyncServiceConfigurator in project wildfly by wildfly.
the class RemoteCacheContainerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<RemoteCacheContainer> container = this.configuration.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(container, this, this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.AsyncServiceConfigurator in project wildfly by wildfly.
the class RemoteCacheServiceConfigurator method build.
@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<RemoteCache<K, V>> cache = this.container.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(cache, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.AsyncServiceConfigurator in project wildfly by wildfly.
the class CacheGroupServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = new AsyncServiceConfigurator(name).build(target);
Consumer<Group> group = new CompositeDependency(this.cache, this.factory).register(builder).provides(name);
Service service = new FunctionalService<>(group, 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 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);
}
Aggregations