Examples of Route


Examples of com.netflix.suro.routing.RoutingMap.Route

    @Test
    public void generateRoutingInfo() throws Exception {
        RoutingInfo route1 = new RoutingInfo(
            ImmutableList.<Route>of(
                new Route(
                    "sink2",
                    new XPathFilter("xpath(\"//customerInfo/country\") =~ \"(?i)^US\"", new JsonMapConverter()),
                    null
                ),

                new Route(
                    "sink3",
                    new XPathFilter("xpath(\"//responseInfo/status\") >= 400", new JsonMapConverter()),
                    null
                )
            ),
View Full Code Here

Examples of com.scooterframework.web.route.Route

     * @param routeName     route name
     * @return route
     */
    public static Route route(String routeName) {
        //validate the routeName
        Route route = MatchMaker.getInstance().getRoute(routeName);
        if (route == null) {
            throw new IllegalArgumentException("\"" + routeName + "\"" +
                        " is not defined as a route.");
        }
        return route;
View Full Code Here

Examples of com.sun.enterprise.ee.server.group.Message.Route

        if (logger.isLoggable(Level.FINER)) {
            logger.finer("Setting " + member + "in " + msgObject
                + ", with key " + msgObject.getMessageAggregationKey());
        }
       
        Route route = msgObject.getRoute();
        // ALLTOONE messages can be sent to a specific instance using GMS
        // sendMessage api. But, the for some reason, I could not get it
        // working. So, ALLTOONE messages reach all instances. We reject the
        // unwanted ones here.
        if (route.ALLTOONE.equals(route) && ! rt.electedSelf()) {
View Full Code Here

Examples of com.taobao.tddl.common.sequence.Config.Route

 
  @SuppressWarnings("unchecked")
  public DetachID<Long, Integer, Integer> parse(Long id) {
    DetachID<Long, Integer, Integer> detachID = new DetachID<Long, Integer, Integer>();

    Route dbRoute = config.getDatabaseRoute();
    Route tableRoute = config.getTableRoute();
    int size = config.getTotalSize();
    long routeBits;
    if(config.isPositionRight()) {
      detachID.setId(id / pow10[size]);
      routeBits = id % pow10[size];
    } else {
      detachID.setId(id % pow10[19 - size]);
      routeBits =  id / pow10[19 - size];
    }
   
    routeBits += Year2000Time;
    Date date = new Date(routeBits);
   
    if(dbRoute == null) {
      detachID.setDatabaseArg(null);
    } else {
      detachID.setDatabaseArg(((Route.AbstractExpression<Date>)dbRoute.getExpression()).execute(date));
    }
   
    if(tableRoute == null) {
      detachID.setTableArg(null);
    } else {
      detachID.setTableArg(((Route.AbstractExpression<Date>)tableRoute.getExpression()).execute(date));
    }
   
    return detachID;

  }
View Full Code Here

Examples of com.vtence.molecule.routing.Route

        }
        return null;
    }

    public void handle(Request request, Response response) throws Exception {
        Route route = routeFor(request);
        if (route != null)
            route.handle(request, response);
        else
            forward(request, response);
    }
View Full Code Here

Examples of ds.moteur.route.Route

    super("Defaut 2");
   
    Carrefour carrefour1 = new Carrefour3Branches(new Point(-61, 0), new Angle3D(Math.PI/2, 0), 3);
    Carrefour carrefour2 = new Carrefour3Branches(new Point(51, 40*(2-Math.sqrt(3))), new Angle3D(-Math.PI/2, 0), 3);
   
    Route route1 = RouteDroite.createRoute(new Point(-40, 0), new Angle3D(0, 0), "Route 1", 30, 3, 1, false);
    Route route2 = new RouteCourbe(new Point(-25, 40), new Angle3D(7*Math.PI/6, 0), "Toto", 40, 3, Math.PI/6);
    Route route3 = new RouteCourbe(new Point(15, -40 + 40*(2-Math.sqrt(3))), new Angle3D(Math.PI/6, 0), "Toto", 40, 3, Math.PI/6);
    Route route4 = RouteDroite.createRoute(new Point(30, 40*(2-Math.sqrt(3))), new Angle3D(0, 0), "Route 4", 30, 3, 1, false);
   
    Route route5 = new RouteCourbe(new Point(-71, 6), new Angle3D(Math.PI/2, 0), "Toto", 10, 3, Math.PI);
    Route route6 = new RouteCourbe(new Point(-71, -6), new Angle3D(-Math.PI/2, 0), "Toto", 10, 3, Math.PI);
    Route route7 = RouteDroite.createRoute(new Point(-81, 0), new Angle3D(Math.PI/2, 0), "Toto", 12, 3, 1, false);
   
    Route route8 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3)) + 6), new Angle3D(Math.PI/2, 0), "Toto", 8, 3, Math.PI/2);
    Route route9 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3)) - 6), new Angle3D(Math.PI, 0), "Toto", 8, 3, Math.PI/2);
    Route route10 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3))), new Angle3D(0, 0), "Toto", 14, 3, Math.PI);
    /*Route route8 = new RouteDroite(new Point(0, -7.5), new Angle3D(Math.PI/2, 0), "Toto", 5, 2.5);
    Route route9 = new RouteDroite(new Point(7.5, 0), new Angle3D(0, 0), "Toto", 5, 2.5);
    Route route10 = new RouteDroite(new Point(7.5, -15), new Angle3D(0, 0), "Toto", 5, 2.5);
    Route route11 = new RouteDroite(new Point(15, -7.5), new Angle3D(Math.PI/2, 0), "Toto", 5, 2.5);
    Route route12 = new RouteCourbe(new Point(20, -7.5), new Angle3D(0, 0), "Toto", 7.5, 2.5, Math.PI);*/
   
    this.addSection(carrefour1);
    this.addSection(carrefour2);
   
    this.addSection(route1);
    this.addSection(route2);
    this.addSection(route3);
    this.addSection(route4);
    this.addSection(route5);
    this.addSection(route6);
    this.addSection(route7);
    this.addSection(route8);
    this.addSection(route9);
    this.addSection(route10);
    /*this.addSection(route11);
    this.addSection(route12);*/
   
    this.calculerTerrainAbsolu();
   
    carrefour1.addConnexion(route1);
    carrefour1.addConnexion(route5);
    carrefour1.addConnexion(route6);
   
    carrefour2.addConnexion(route4);
    carrefour2.addConnexion(route8);
    carrefour2.addConnexion(route9);
   
    route1.addConnexion(carrefour1);
    route1.addConnexion(route2);
   
    route2.addConnexion(route1);
    route2.addConnexion(route3);
   
    route3.addConnexion(route2);
    route3.addConnexion(route4);
   
    route4.addConnexion(route3);
    route4.addConnexion(carrefour2);
   
    route5.addConnexion(carrefour1);
    route5.addConnexion(route7);
   
    route6.addConnexion(carrefour1);
    route6.addConnexion(route7);
   
    route7.addConnexion(route5);
    route7.addConnexion(route6);
   
    route8.addConnexion(carrefour2);
    route8.addConnexion(route10);
   
    route9.addConnexion(carrefour2);
    route9.addConnexion(route10);
   
    route10.addConnexion(route8);
    route10.addConnexion(route9);
   
    this.etablirConnexion();
   
    //System.out.println(this.essayerLienBidirectionnel(carrefour1, carrefour2));
   
View Full Code Here

Examples of fr.adrienbrault.idea.symfony2plugin.routing.Route

                    routes = RouteHelper.getAllRoutes(stringLiteralExpression.getProject());
                }

                String contents = stringLiteralExpression.getContents();
                if(contents.length() > 0 && routes.containsKey(contents)) {
                    final Route route = routes.get(contents);

                    final String url = RouteHelper.getRouteUrl(route);
                    if(url != null) {
                        descriptors.add(new FoldingDescriptor(stringLiteralExpression.getNode(),
                            new TextRange(stringLiteralExpression.getTextRange().getStartOffset() + 1, stringLiteralExpression.getTextRange().getEndOffset() - 1), group) {
View Full Code Here

Examples of gov.nist.javax.sip.header.Route

        // by a Proxy, then the proxy will take care of stripping the
        // Route header. If the request is being processed by an
        // endpoint, then the stack strips off the route header.
        if (sipRequest.getHeader(Route.NAME) != null && transaction.getDialog() != null) {
            RouteList routes = sipRequest.getRouteHeaders();
            Route route = (Route) routes.getFirst();
            SipUri uri = (SipUri) route.getAddress().getURI();
            int port;
            if (uri.getHostPort().hasPort()) {
                port = uri.getHostPort().getPort();
            } else {
                if (listeningPoint.getTransport().equalsIgnoreCase("TLS"))
View Full Code Here

Examples of gov.nist.javax.sip.header.Route

        // start at the end of the list and walk backwards
        ListIterator<RecordRoute> li = recordRouteList.listIterator(recordRouteList.size());
        while (li.hasPrevious()) {
            RecordRoute rr = (RecordRoute) li.previous();

            Route route = new Route();
            route.setAddress((AddressImpl) ((AddressImpl) rr.getAddress()).clone());
            route.setParameters((NameValueList) rr.getParameters().clone());
            routeList.add(route);
        }

        Contact contact = null;
        if (lastResponse.getContactHeaders() != null) {
            contact = (Contact) lastResponse.getContactHeaders().getFirst();
        }

        if (!((SipURI) ((Route) routeList.getFirst()).getAddress().getURI()).hasLrParam()) {

            // Contact may not yet be there (bug reported by Andreas B).

            Route route = null;
            if (contact != null) {
                route = new Route();
                route.setAddress((AddressImpl) ((AddressImpl) (contact.getAddress())).clone());
            }

            Route firstRoute = (Route) routeList.getFirst();
            routeList.removeFirst();
            javax.sip.address.URI uri = firstRoute.getAddress().getURI();
            ackRequest.setRequestURI(uri);

            if (route != null)
                routeList.add(route);
View Full Code Here

Examples of gov.nist.javax.sip.header.Route

                boolean addRoute = true;
                while (li.hasPrevious()) {
                    RecordRoute rr = (RecordRoute) li.previous();

                    if (addRoute) {
                        Route route = new Route();
                        AddressImpl address = ((AddressImpl) ((AddressImpl) rr.getAddress())
                                .clone());

                        route.setAddress(address);
                        route.setParameters((NameValueList) rr.getParameters().clone());

                        this.routeList.add(route);
                    }
                }
            } else {
                // This is a server dialog. The top most record route
                // header is the one that is closest to us. We extract the
                // route list in the same order as the addresses in the
                // incoming request.
                this.routeList = new RouteList();
                ListIterator li = recordRouteList.listIterator();
                boolean addRoute = true;
                while (li.hasNext()) {
                    RecordRoute rr = (RecordRoute) li.next();

                    if (addRoute) {
                        Route route = new Route();
                        AddressImpl address = ((AddressImpl) ((AddressImpl) rr.getAddress())
                                .clone());
                        route.setAddress(address);
                        route.setParameters((NameValueList) rr.getParameters().clone());
                        routeList.add(route);
                    }
                }
            }
        } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.