Been thinking over the weekend on this issue. I rather like the call
interface. It is a unified and well encapsulated entity.

How about keeping the Restlets "handle(Call)"  as is and let it
extract the request and response objects as and when it requires?

Call.getRequest()
Call.getResponse()

Sometimes the client code only needs either Request or Response
objects and sometimes both. And this will also reduce parameter
clutter while declaring new methods.

Another +ve might be lazy initialization of these two objects. The
code internally might not create these two objects till the first time
their getters are called. This might lead to performance gains for
code that just relies on one of both.

Thoughts?

Cheers
Piyush

Reply via email to