Hi Sumit, Container create/manage the connectors because they can/should be shared between multiple applications (think about virtual hosting multiple applications on the same HTTP 80 port). For client connectors we want to be able to implement connection pooling, etc.
>From inside an application you can easily use the container's connector via the Restlet's Context and its "getClient()" method (to be renamed getDispatcher() in beta 21). Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de Sumit Lohia > Envoyé : mardi 14 novembre 2006 00:21 > À : [email protected] > Objet : Client connectors and Applications > > I'm looking at tutorial #6 > (http://www.restlet.org/tutorial#part06), and I'm not > sure I understand how applications and containers should be > organized. > > If the Application is something that can be distributed > opaquely and moved > around from Container to Container, why can't the Application > open a Client > connector directly? Why does the Container need to open it? > > Or do I need to keep a reference to the Container in my > application and call > parentContainer.getClients().add() in order to add the file Connector? > > Thanks. > > Sumit

