Saturday, June 29, 2013

Re: RpcTokenImplementation

RpcToken is an interface and thus GWT would generate serializers for all possible implementations of that interface (because it can not know at compile time which implementation of RpcToken will be send between client <-> server. It must support all implementations it can find on classpath).

Currently GWT only provides a single implementation (XsrfToken), so it doesn't really matter if you use this annotation or not. If you write your own implementation of RpcToken and/or GWT would provide more than one implementation, then you could use this annotation to tell GWT which implementation you actually use. 

This annotation exists pretty much for the same reason you are using concrete collection implementations like ArrayList instead of the List interface in GWT-RPC serializable classes: Reduce the amount of generated code => reduce the size of your final JavaScript code.

-- J.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment