use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class RouteRegistryEntryProviderServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<Map.Entry<String, Void>> entry = this.route.register(builder).provides(name);
Service service = new FunctionalService<>(entry, this, this.route);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class ClientMappingsRegistryEntryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<Map.Entry<String, List<ClientMapping>>> entry = new CompositeDependency(this.group, this.clientMappings).register(builder).provides(name);
Service service = new FunctionalService<>(entry, 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 ChannelServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<JChannel> channel = new CompositeDependency(this.factory, this.cluster, this.server).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(channel, 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 AuthTokenServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<T> token = this.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(token, CREDENTIAL_SOURCE_MAPPER.andThen(this), this.sharedSecretSource);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class ForkChannelFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<ChannelFactory> factory = new CompositeDependency(this.parentChannel, this.parentFactory).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.protocols) {
dependency.register(builder);
}
Service service = new FunctionalService<>(factory, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Aggregations