Search in sources :

Example 11 with RouteLocator

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

the class LocalRouteLocatorServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<RouteLocator> locator = this.route.register(builder).provides(name);
    Service service = new FunctionalService<>(locator, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : RouteLocator(org.wildfly.clustering.web.routing.RouteLocator) LocalRouteLocator(org.wildfly.clustering.web.cache.routing.LocalRouteLocator) FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Aggregations

RouteLocator (org.wildfly.clustering.web.routing.RouteLocator)11 Service (org.jboss.msc.Service)7 ServiceName (org.jboss.msc.service.ServiceName)6 FunctionalService (org.wildfly.clustering.service.FunctionalService)5 Test (org.junit.Test)4 Group (org.wildfly.clustering.group.Group)2 Node (org.wildfly.clustering.group.Node)2 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)2 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)2 Address (org.infinispan.remoting.transport.Address)1 SessionIdentifierCodec (org.jboss.as.web.session.SessionIdentifierCodec)1 GroupedKey (org.wildfly.clustering.ee.infinispan.GroupedKey)1 KeyDistribution (org.wildfly.clustering.infinispan.distribution.KeyDistribution)1 LocalRouteLocator (org.wildfly.clustering.web.cache.routing.LocalRouteLocator)1 NullRouteLocator (org.wildfly.clustering.web.cache.routing.NullRouteLocator)1 PrimaryOwnerRouteLocator (org.wildfly.clustering.web.infinispan.routing.PrimaryOwnerRouteLocator)1