Package org.ontoware.jrest

Examples of org.ontoware.jrest.RestServer.start()


  public static void main(String[] args) throws Exception {
    RestServer rs = new RestServer(8888);
    Adder adder = new Adder();
    rs.registerRestlet("add", adder);
    rs.start();
  }

  public RestResponse get(@RestAddressByParameter("one")
  int a, @RestAddressByParameter("two")
  int b) {
View Full Code Here


    instance = new Step1();
   
    //TODO explain the concept Restlet
    rs.registerRestlet("add", instance);
    // to unregister Restlet: rs.unregisterRestlet("step1");
    rs.start();
    // to stop the RestServer: rs.stop();
   
    //TODO clear confusion about rs.run() & rs.start()
  }
 
View Full Code Here

  public static void main(String[] args) {
    RestServer rs = new RestServer(8889);
    instance = new Step2();
    rs.registerRestlet("mul", instance);
    try {
      rs.start();
    } catch (Exception e) {
      System.out.println(e);
    }
  }
 
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.