Restlet ordersRestlet = new DefaultRestlet(myContainer)
Restlet ordersRestlet = 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);         // Attach a log Chainlet to the container         LogChainlet log = new LogChainlet(myContainer, "com.noelios.restlet.example");         myContainer.attach(log);         // Attach a status Chainlet to the log Chainlet         StatusChainlet status = new StatusChainlet(myContainer, true, "webmaster@mysite.org", "http://www.mysite.org");         log.attach(status);         // Create a host Maplet matching calls to the server         HostMaplet host = new HostMaplet(myContainer, 8182);         status.attach(host);         // Attach a guard Chainlet to secure access the the chained directory Restlet         GuardChainlet guard = new GuardChainlet(myContainer, "com.noelios.restlet.example", true, ChallengeSchemes.HTTP_BASIC , "Restlet tutorial", true)	      	{		      	protected boolean authorize(Call call)		         {            		return "scott".equals(call.getSecurity().getLogin()) &&      				 			 "tiger".equals(call.getSecurity().getPassword());		         }	         };         host.attach("/docs/", guard);         // Create a directory Restlet able to return a deep hierarchy of Web files         DirectoryRestlet dirRestlet = new DirectoryRestlet(myContainer, "D:/Restlet/www/docs/api/", true, "index");         dirRestlet.addExtension("html", MediaTypes.TEXT_HTML);         dirRestlet.addExtension("css", MediaTypes.TEXT_CSS);         dirRestlet.addExtension("gif", MediaTypes.IMAGE_GIF);         guard.attach(dirRestlet);         // Create the users Maplet         Maplet usersMaplet = new DefaultMaplet(myContainer);         host.attach("/users", usersMaplet);         // Create the user Maplet         Maplet userMaplet = new DefaultMaplet(myContainer)            {               public void handle(Call call)               {                  if(call.getResourcePath().equals(""))                  {                     // Print the requested URI path                     String output = "Account of user named: " + call.getContextRef().getLastSegment();                     call.setOutput(new StringRepresentation(output, MediaTypes.TEXT_PLAIN));                  }                  else                  {                     // Continue processing                     delegate(call);                  }               }            };         usersMaplet.attach("/[a-z]+", userMaplet);         // Create the orders Restlet         Restlet ordersRestlet = new DefaultRestlet(myContainer)            {               public void handleGet(Call call)               {                  // Print the user name of the requested orders                  List<String> segments = call.getContextRef().getSegments();                  String output = "Orders of user named: " + segments.get(segments.size() - 2);                  call.setOutput(new StringRepresentation(output, MediaTypes.TEXT_PLAIN));               }            };         userMaplet.attach("/orders$", ordersRestlet);         // Now, let's start the container!         myContainer.start();      }      catch(Exception e)      {         e.printStackTrace();      }   }