I cannot understand how to use org.restlet.Server class for handling different kinds of ServerResource's.
I want run:
new Server(Protocol.HTTP, 8182, SomeNotYetReady.class).start();
and I want to get a different Resource according to the URL entered. For example, browsing to
http://myserver:8182/rest/new-customer
could be used for inserting a new customer in server database, while
http://myserver:8182/rest/new-order
could be used for creating a new customer's order, and
http://myserver:8182/rest/get-order
could be used for orders retrieval.
Is my approach correct? If so, what classes should I write for this purpose, and which class has to be passed to Server constructor?
Thank you.
EDIT:
I have realized that this question is related to Restlet - trouble attaching Resource class with Router, and there is a perfect answer there.