Package org.restlet.routing

Examples of org.restlet.routing.Router


        return "/wm/device";
    }
   
    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/", DeviceResource.class);
        router.attach("/debug", DeviceEntityResource.class);
        return router;
    }
View Full Code Here


    /**
     * Create the Restlet router and bind to the proper resources.
     */
    @Override
    public Router getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/autoportfast/{state}/json", AutoPortFast.class); // enable/true or disable/false
        return router;
    }
View Full Code Here

    /**
     * Create the Restlet router and bind to the proper resources.
     */
    @Override
    public Router getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/links/json", LinksResource.class);
        router.attach("/directed-links/json", DirectedLinksResource.class);
        router.attach("/external-links/json", ExternalLinksResource.class);
        router.attach("/tunnellinks/json", TunnelLinksResource.class);
        router.attach("/switchclusters/json", SwitchClustersResource.class);
        router.attach("/broadcastdomainports/json", BroadcastDomainPortsResource.class);
        router.attach("/enabledports/json", EnabledPortsResource.class);
        router.attach("/blockedports/json", BlockedPortsResource.class);
        router.attach("/route/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", RouteResource.class);
        return router;
    }
View Full Code Here

            this.context = getContext();
        }
       
        @Override
        public Restlet createInboundRoot() {
            Router baseRouter = new Router(context);
            baseRouter.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
            for (RestletRoutable rr : restlets) {
                baseRouter.attach(rr.basePath(), rr.getRestlet(context));
            }

            Filter slashFilter = new Filter() {           
                @Override
                protected int beforeHandle(Request request, Response response) {
View Full Code Here

public class VirtualNetworkWebRoutable implements RestletRoutable {

    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/tenants/{tenant}/networks", NetworkResource.class); // GET
        router.attach("/tenants/{tenant}/networks/{network}", NetworkResource.class); // PUT, DELETE
        router.attach("/tenants/{tenant}/networks", NetworkResource.class); // POST
        router.attach("/tenants/{tenant}/networks/{network}/ports/{port}/attachment", HostResource.class);
        router.attachDefault(NoOp.class);
        return router;
    }
View Full Code Here

        return "/wm/core";
    }

    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/module/all/json", ModuleLoaderResource.class);
        router.attach("/module/loaded/json", LoadedModuleLoaderResource.class);
        router.attach("/switch/{switchId}/role/json", SwitchRoleResource.class);
        router.attach("/switch/all/{statType}/json", AllSwitchStatisticsResource.class);
        router.attach("/switch/{switchId}/{statType}/json", SwitchStatisticsResource.class);
        router.attach("/controller/switches/json", ControllerSwitchesResource.class);
        router.attach("/counter/{counterTitle}/json", CounterResource.class);
        router.attach("/counter/{switchId}/{counterName}/json", SwitchCounterResource.class);
        router.attach("/counter/categories/{switchId}/{counterName}/{layer}/json", SwitchCounterCategoriesResource.class);
        router.attach("/memory/json", ControllerMemoryResource.class);
        router.attach("/packettrace/json", PacketTraceResource.class);
        router.attach("/storage/tables/json", StorageSourceTablesResource.class);
        router.attach("/controller/summary/json", ControllerSummaryResource.class);
        router.attach("/role/json", ControllerRoleResource.class);
        router.attach("/health/json", HealthCheckResource.class);
        router.attach("/system/uptime/json", SystemUptimeResource.class);
        return router;
    }
View Full Code Here

        return "/wm/debugcounter";
    }

    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/{param1}/{param2}/{param3}/{param4}/", DebugCounterResource.class);
        router.attach("/{param1}/{param2}/{param3}/{param4}", DebugCounterResource.class);
        router.attach("/{param1}/{param2}/{param3}/", DebugCounterResource.class);
        router.attach("/{param1}/{param2}/{param3}", DebugCounterResource.class);
        router.attach("/{param1}/{param2}/", DebugCounterResource.class);
        router.attach("/{param1}/{param2}", DebugCounterResource.class);
        router.attach("/{param1}/", DebugCounterResource.class);
        router.attach("/{param1}", DebugCounterResource.class);
        router.attach("/", DebugCounterResource.class);
        router.attach("", DebugCounterResource.class);
        return router;
    }
View Full Code Here

        return "/wm/storage";
    }

    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/notify/json", StorageNotifyResource.class);
        return router;
    }
View Full Code Here

    /**
     * Create the Restlet router and bind to the proper resources.
     */
    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/json", StaticFlowEntryPusherResource.class);
        router.attach("/json/store", StaticFlowEntryPusherResource.class);
        router.attach("/json/delete", StaticFlowEntryDeleteResource.class);
        router.attach("/clear/{switch}/json", ClearStaticFlowEntriesResource.class);
        router.attach("/list/{switch}/json", ListStaticFlowEntriesResource.class);
        return router;
    }
View Full Code Here

     * Creates a root Restlet that will receive all incoming calls.
     */
    @Override
    public synchronized Restlet createInboundRoot()
    {
        Router router = new Router( getContext() );

        router.attach( "/entity", createFinder( EntitiesResource.class ) );
        router.attach( "/entity/{identity}", createFinder( EntityResource.class ) );

        router.attach( "/query", createFinder( SPARQLResource.class ) );
        router.attach( "/query/sparqlhtml", createFinder( SPARQLResource.class ) );
        router.attach( "/query/index", createFinder( IndexResource.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.