use of org.jboss.msc.Service 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.jboss.msc.Service in project wildfly by wildfly.
the class HotRodSSOManagerFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
this.configurator.build(target).install();
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SSOManagerFactory<A, D, S, TransactionBatch>> factory = this.cache.register(builder).provides(this.getServiceName());
Service service = Service.newInstance(factory, new HotRodSSOManagerFactory<>(this));
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service 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.jboss.msc.Service in project wildfly by wildfly.
the class LocalCommandDispatcherFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<CommandDispatcherFactory> factory = this.group.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(factory, Functions.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class DistributableSessionManagerFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
this.configurator.build(target).install();
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Supplier<org.wildfly.clustering.web.session.SessionManagerFactory<ServletContext, Map<String, Object>, Batch>> impl = builder.requires(this.configurator.getServiceName());
Consumer<SessionManagerFactory> factory = builder.provides(this.getServiceName());
Service service = new FunctionalService<>(factory, this, impl);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations