Package com.metrictracker.ws

Source Code of com.metrictracker.ws.MetricTrackerWSServlet

package com.metrictracker.ws;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class MetricTrackerWSServlet extends Application {

  /**
   * Creates a root Restlet that will receive all incoming calls.
   */
  @Override
  public Restlet createInboundRoot() {
    // Create a router Restlet that routes each call to a
    // new instance of HelloWorldResource.
    Router router = new Router(getContext());

    // Defines only one route
    //router.attachDefault(ManageMetric.class);
    router.attach("/metric/{metricName}", ManageMetric.class);
    router.attach("/metricgoal/{metricName}", ManageMetricGoal.class);
    router.attach("/metricvalue/{metricName}", ManageMetricValue.class);
  //  router.attach("/getmetricstream/{metricName}", MetricStream.class);

    return router;
  }
}
TOP

Related Classes of com.metrictracker.ws.MetricTrackerWSServlet

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.