why getPermutationStrongName is final and writeResponse is private?

25 views
Skip to first unread message

Constantino

unread,
Nov 11, 2011, 6:32:33 AM11/11/11
to Google Web Toolkit
Hi,

I am extending the RemoteServiceServlet and having trouble with those
methods because one is final and the other is private.

Is there any special reason for this?

It is funny that the method readContent is protected and its
counterpart writeResponse is private. This means in my subclass I can
change how the payload will be extracted from the request but I can
not change how the response is going to be sent.

For the getPermutationStrongName case I don't want to send it as a
header anymore so I had to overwrite the method
checkPermutationStrongName that calls that method.

Thanks,
Constantino

Thomas Broyer

unread,
Nov 12, 2011, 4:12:10 AM11/12/11
to google-we...@googlegroups.com
How about writing a servlet filter instead, where you'd "transform" the permutation strong name from the query-string or payload (don't know how you send it) to a header before delegating down the chain to the servlet?
...or extending the servlet and doing similar things (transform the request and response, instead of changing how they're processed/generated) on the process() method.
Reply all
Reply to author
Forward
0 new messages