Re: expect/continue handshake

2012-12-11 Thread Tim Peierls
It might be easier to start by writing the client side of this using the
classic Restlet APIs and not the annotation-based API, setting the Expect
and Content-Length headers manually and checking the response for a 100
status.

--tim

On Mon, Dec 10, 2012 at 9:35 AM, Ishaaq Chandy ish...@gmail.com wrote:

 Hi all,
 I have a client app that is communicates using a ClientResource to a
 ServerResource. The latter is managed using the annotations mechanism -
 much
 like what is documented here:

 http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/328-restlet/285-restlet.html

 The client sends large payloads to the server via a PUT call and sometimes
 the server needs to push back. I think the ideal way to do this would be to
 use an HTTP Expect/Continue handshake so as to avoid the client sending
 across large amounts of data if the server isn't ready for it. However, I
 can't find any documentation or examples of how I can achieve this. Does
 anyone here have any pointers/suggestions?

 I am using restlet 2.0.x

 Thanks,
 Ishaaq



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/expect-continue-handshake-tp7578505.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3034546


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

Re: expect/continue handshake

2012-12-11 Thread Ishaaq Chandy
Thanks for the reply Tim.

That is a bit unfortunate that I can't use the annotation api for the
client.

What about the server? How do I hook into it in order to be able to either
send a 100 or reject the request if it is unable to process it?

Cheers,
Ishaaq


Tim Peierls wrote
 It might be easier to start by writing the client side of this using the
 classic Restlet APIs and not the annotation-based API, setting the
 Expect
 and Content-Length headers manually and checking the response for a 100
 status.
 
 --tim
 
 On Mon, Dec 10, 2012 at 9:35 AM, Ishaaq Chandy lt;

 ishaaq@

 gt; wrote:
 
 Hi all,
 I have a client app that is communicates using a ClientResource to a
 ServerResource. The latter is managed using the annotations mechanism -
 much
 like what is documented here:

 http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/328-restlet/285-restlet.html

 The client sends large payloads to the server via a PUT call and
 sometimes
 the server needs to push back. I think the ideal way to do this would be
 to
 use an HTTP Expect/Continue handshake so as to avoid the client sending
 across large amounts of data if the server isn't ready for it. However, I
 can't find any documentation or examples of how I can achieve this. Does
 anyone here have any pointers/suggestions?

 I am using restlet 2.0.x

 Thanks,
 Ishaaq





--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/expect-continue-handshake-tp7578505p7578510.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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


Get all ServerResource objects and their routes from Applicaiton

2012-12-11 Thread Paul Morris
I'm trying to figure out a way to at runtime get each ServerResource and its 
URI route from the org.restlet.Application API but can't seem to figure it out. 
Below is an example. So again I need the relative ref and the object (or even 
just its class).

router.attach(/, tracer);
router.attach(/accounts/, tracer);
router.attach(/accounts/{accountId}, blocker);

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