Paul Sandoz wrote:
>> Note that put() method doesn't need to be annotated itself because its
>> name
>> and the presence of @Input ensure it is correctly detected.
>
> What happens if the put (or delete/post/head) method does not consume
> any input or produce any output?
>
I went back and looked at your example and answered my question:
public class ClientResource extends AccountResource {
...
public void delete() {
getAccount().getClients().remove(getClient());
}
so i assume you are relying on a method naming convention (as you do in
Restlet).
I am in general agreement with Dhanji on this.
IMHO it is important to have a clear declarative mechanism, that is not
prone to mis-interpretation or error, to identify Java methods that
process HTTP requests. This is what annotations are good at :-) an
annotation (like HttpMethod, or whatever you want to call it) provides
such a clear declarative mechanism.
Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109