Package org.restlet.routing

Examples of org.restlet.routing.Router


    return root;
  }

  protected Restlet createRootRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/" + PROTOCOL, ProtocolResource.class);
    router.attach("/" + SCHEMAS, SchemaResource.class);
    router.attach("/" + CONFIGURATIONS, createConfigurationsRouter(c));
    router.attach("/" + TEMPLATES, createTemplatesRouter(c));
    router.attach("/" + REPOSITORIES, createRepositoriesRouter(c));
    router.attach("/" + SESSION, createSessionPath(c));
    router.attach("/cas-proxy-callback", CasProxyCallback.class);
    return router;
  }
View Full Code Here


    router.attach("/cas-proxy-callback", CasProxyCallback.class);
    return router;
  }

  protected Restlet createConfigurationsRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + CONFIGURATION_ID_PARAM + "}", ConfigurationResource.class);
    router.attach("", ConfigurationListResource.class);
    return router;
  }
View Full Code Here

    router.attach("", ConfigurationListResource.class);
    return router;
  }

  protected Restlet createTemplatesRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + TEMPLATE_ID_PARAM + "}", TemplateResource.class);
    router.attach("", TemplateListResource.class);
    return router;
  }
View Full Code Here

    router.attach("", TemplateListResource.class);
    return router;
  }

  protected Restlet createRepositoriesRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + REPOSITORY_ID_PARAM + "}", new RepositoryResolver(c, createRepositoryRouter(c)));
    router.attach("", RepositoryListResource.class);
    return router;
  }
View Full Code Here

    router.attach("", RepositoryListResource.class);
    return router;
  }

  protected Restlet createRepositoryRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/" + CONNECTIONS, createExplicitConnectionRouter(c));
    router.attachDefault(new ScopedConnectionTagger(c, createImplicitConnectionRouter(c)));
    return router;
  }
View Full Code Here

    router.attachDefault(new ScopedConnectionTagger(c, createImplicitConnectionRouter(c)));
    return router;
  }

  protected Restlet createExplicitConnectionRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + CONNECTION_ID_PARAM + "}", new ConnectionResolver(c, createConnectionRouter(c)));
    router.attach("", ConnectionListResource.class);
    return router;
  }
View Full Code Here

    router.attach("", ConnectionListResource.class);
    return router;
  }

  protected Restlet createImplicitConnectionRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/" + STATEMENTS, StatementsResource.class);
    router.attach("/" + CONTEXTS, ContextsResource.class);
    router.attach("/" + SIZE, SizeResource.class);
    router.attach("/" + METADATA, MetaDataResource.class);
    router.attach("/" + NAMESPACES, createNamespacesRouter(c));
    router.attach("", new QueryParser(c, new QueryTypeRouter(c)));
    return router;
  }
View Full Code Here

    router.attach("", new QueryParser(c, new QueryTypeRouter(c)));
    return router;
  }

  protected Restlet createConnectionRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/" + STATEMENTS, StatementsResource.class);
    router.attach("/" + CONTEXTS, ContextsResource.class);
    router.attach("/" + SIZE, SizeResource.class);
    router.attach("/" + METADATA, MetaDataResource.class);
    router.attach("/" + NAMESPACES, createNamespacesRouter(c));
    router.attach("/" + BNODES, BNodesResource.class);
    router.attach("/" + QUERIES, createQueriesRouter(c));
    router.attach("/" + BEGIN, BeginTxnResource.class);
    router.attach("/" + COMMIT, CommitTxnResource.class);
    router.attach("/" + ROLLBACK, RollbackTxnResource.class);
    router.attach("/" + PING, PingConnectionResource.class);
    router.attach("", new QueryParser(c, new QueryTypeRouter(c, ConnectionResource.class)));
    return router;
  }
View Full Code Here

    router.attach("", new QueryParser(c, new QueryTypeRouter(c, ConnectionResource.class)));
    return router;
  }

  protected Restlet createNamespacesRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + NS_PREFIX_PARAM + "}", NamespaceResource.class);
    router.attach("", NamespaceListResource.class);
    return router;
  }
View Full Code Here

    router.attach("", NamespaceListResource.class);
    return router;
  }

  protected Restlet createQueriesRouter(Context c) {
    Router router = new Router(c);
    router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
    router.attach("/{" + QUERY_ID_PARAM + "}", new PreparedQueryResolver(c, new QueryTypeRouter(c,
        PreparedQueryResource.class)));
    router.attach("", new QueryParser(c, QueryListResource.class));
    return router;
  }
View Full Code Here

TOP

Related Classes of org.restlet.routing.Router

Copyright © 2018 www.massapicom. 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.