Restlet myRestlet = new DefaultRestlet(myContainer)
Restlet myRestlet = new AbstractRestlet(myContainer)
   public static void main(String[] args)   {      try      {         // Create a new Restlet container         RestletContainer myContainer = new RestletContainer("My container");         // Create the HTTP server connector, then add it as a server connector         // to the Restlet container. Note that the container is the call restlet.         Server server = new DefaultServer(Protocols.HTTP, "My server", myContainer, 8182);         myContainer.addServer(server);         // Create a host Maplet matching calls to the server         HostMaplet rootMaplet = new HostMaplet(myContainer, 8182);         myContainer.attach(rootMaplet);         // Create a new Restlet that will display some path information.         Restlet myRestlet = new DefaultRestlet(myContainer)            {               public void handleGet(Call call)               {                  // Print the requested URI path                  String output = "Resource URI:  " + call.getResourceRef() + '\n' +                                  "Context path:  " + call.getContextPath() + '\n' +                                  "Resource path: " + call.getResourcePath() + '\n' +                                  "Query string:  " + call.getResourceRef().getQuery();                  call.setOutput(new StringRepresentation(output));               }            };         // Then attach it to the root Maplet.         rootMaplet.attach("/trace", myRestlet);         // Now, let's start the container!         // Note that the HTTP server connector is also automatically started.         myContainer.start();      }      catch(Exception e)      {         e.printStackTrace();      }   }