Alex,

Using getClientDispatcher() in your case is the way to go. You could also 
create a new Client(Protocol.RIAP) if you don't have access to the Restlet 
current context.

I've removed the "mostly" word from the getServerDispatcher() Javadocs and 
added this clarification:

"Note that the RIAP pseudo protocol isn't supported by this dispatcher, you 
should instead rely on the {...@link #getClientDispatcher()} method."

Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.o​rg
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Alex 
Milowski
Envoyé : vendredi 4 juin 2010 11:50
À : [email protected]
Objet : getServerDispatcher() usage

For most of my work where I call internal resources via RIAP, I've been using
getClientDispatcher() to call back to restlets attached to the internal router 
of the component.  In looking at getServerDispatcher(), I'm curious as to which 
RIAP URI's are supported and whether I should be using the Client instance 
returned by this method instead of getClientDispatcher().

The javadoc says:

"Returns a request dispatcher to component's virtual hosts. This is mostly 
useful for application that want to optimize calls to other applications hosted 
in the same component or to the application itself."

The phrase "mostly useful" doesn't seem to imply "only for".  Will any RIAP URI 
work?  Should I use this Client for RIAP URIs over the getClientDispatcher() 
that I have been using?

--Alex Milowski

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2616805

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2652391

Reply via email to