Search in sources :

Example 1 with RouteLocatorServiceConfiguratorFactory

use of org.wildfly.clustering.web.routing.RouteLocatorServiceConfiguratorFactory in project wildfly by wildfly.

the class AffinityServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<RouteLocatorServiceConfiguratorFactory<C>> factory = builder.provides(name);
    Service service = Service.newInstance(factory, this.get());
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) Service(org.jboss.msc.Service) RouteLocatorServiceConfiguratorFactory(org.wildfly.clustering.web.routing.RouteLocatorServiceConfiguratorFactory)

Aggregations

Service (org.jboss.msc.Service)1 ServiceName (org.jboss.msc.service.ServiceName)1 RouteLocatorServiceConfiguratorFactory (org.wildfly.clustering.web.routing.RouteLocatorServiceConfiguratorFactory)1