Examples of RouteManager


Examples of org.apache.abdera.protocol.server.impl.RouteManager

        processors.put(OpenSearchTargetTypes.OPENSEARCH_URL, osUrlProcessor);

        DefaultWorkspaceManager wsManager = new DefaultWorkspaceManager();
        wsManager.setWorkspaces(new LinkedList<WorkspaceInfo>());

        RouteManager routeManager = new RouteManager();
        routeManager.addRoute("service", "/", TargetType.TYPE_SERVICE).addRoute("feed",
                                                                                "/atom/:collection",
                                                                                TargetType.TYPE_COLLECTION)
            .addRoute("entry", "/atom/:collection/:entry", TargetType.TYPE_ENTRY)
            .addRoute("categories", "/atom/:collection/:entry;categories", TargetType.TYPE_CATEGORIES)
            .addRoute("osSearch1", "/search1", OpenSearchTargetTypes.OPENSEARCH_URL);
View Full Code Here

Examples of org.apache.abdera.protocol.server.impl.RouteManager

        super();
        init();
    }

    private void init() {
        RouteManager routeManager =
            new RouteManager().addRoute("service", "/", TargetType.TYPE_SERVICE).addRoute("feed",
                                                                                          "/:feed",
                                                                                          TargetType.TYPE_COLLECTION)
                .addRoute("entry", "/:feed/:entry", TargetType.TYPE_ENTRY);
        setTargetBuilder(routeManager);
        setTargetResolver(routeManager);
View Full Code Here

Examples of org.apache.abdera.protocol.server.impl.RouteManager

    public void testUrlForEmptyContext() throws Exception {
        runTestUrlFor("/app/base/", null);
    }

    private void runTestUrlFor(String expected, Map<String, String> context) {
        RouteManager manager = new RouteManager().addRoute(new Route("entry", "/base/:entry"));

        RequestContext request = createMock(RequestContext.class);
        expect(request.getContextPath()).andReturn("/app");
        replay(request);

        assertEquals(expected, manager.urlFor(request, "entry", context));
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.impl.RouteManager

        assertEquals(expected, manager.urlFor(request, "entry", context));
    }

    @Test
    public void testStaticResolve() throws Exception {
        RouteManager manager = new RouteManager();
        manager.addRoute(new Route("collection", "/:coll"), TargetType.TYPE_COLLECTION)
            .addRoute(new Route("openSearch", "/openSearch.xml"), TargetType.TYPE_ENTRY);

        RequestContext request = createMock(RequestContext.class);
        expect(request.getTargetPath()).andReturn("/openSearch.xml");
        replay(request);

        RouteTarget target = (RouteTarget)manager.resolve(request);
        assertEquals("/openSearch.xml", target.getRoute().getPattern());
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.impl.RouteManager

 
  public CustomProvider() {
   
    this.adapter = new SimpleAdapter();
   
    RouteManager rm =
      new RouteManager()
        .addRoute("service", "/", TargetType.TYPE_SERVICE)
        .addRoute("collection", "/:collection", TargetType.TYPE_COLLECTION)
        .addRoute("entry","/:collection/:entry", TargetType.TYPE_ENTRY);
   
    setTargetBuilder(rm);
View Full Code Here

Examples of org.jboss.seam.jms.bridge.RouteManager

    private Set<AnnotatedMethod<?>> observerMethodRegistry = new HashSet<AnnotatedMethod<?>>();
    private boolean readyToRoute = false;

    public void buildRoutes(@Observes final AfterBeanDiscovery abd, final BeanManager bm) {
        log.debug("Building JMS Routes.");
        RouteManager routeManager = new RouteManagerImpl();
        for (AnnotatedType<?> at : eventRoutingRegistry) {
            Object instance = null;
            try {
                instance = at.getJavaClass().newInstance();
            } catch (InstantiationException ex) {
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.