Revision: 9991
Author: me...@google.com
Date: Wed Apr 13 19:08:53 2011
Log: Expose delegate constructor.
Review by: j...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9991
Modified:
/trunk/user/src/com/google/gwt/user/server/rpc/AbstractXsrfProtectedServiceServlet.java
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java
=======================================
---
/trunk/user/src/com/google/gwt/user/server/rpc/AbstractXsrfProtectedServiceServlet.java
Wed Feb 23 14:40:04 2011
+++
/trunk/user/src/com/google/gwt/user/server/rpc/AbstractXsrfProtectedServiceServlet.java
Wed Apr 13 19:08:53 2011
@@ -41,6 +41,24 @@
*/
public abstract class AbstractXsrfProtectedServiceServlet extends
RemoteServiceServlet {
+
+ /**
+ * The default constructor used by service implementations that
+ * extend this class. The servlet will delegate AJAX requests to
+ * the appropriate method in the subclass.
+ */
+ public AbstractXsrfProtectedServiceServlet() {
+ super();
+ }
+
+ /**
+ * The wrapping constructor used by service implementations that are
+ * separate from this class. The servlet will delegate AJAX
+ * requests to the appropriate method in the given object.
+ */
+ public AbstractXsrfProtectedServiceServlet(Object delegate) {
+ super(delegate);
+ }
@Override
protected void onAfterRequestDeserialized(RPCRequest rpcRequest) {
=======================================
---
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
Mon Feb 28 10:45:39 2011
+++
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
Wed Apr 13 19:08:53 2011
@@ -63,6 +63,16 @@
public XsrfProtectedServiceServlet(String sessionCookieName) {
this.sessionCookieName = sessionCookieName;
}
+
+ public XsrfProtectedServiceServlet(Object delegate) {
+ this(delegate, null);
+ }
+
+ public XsrfProtectedServiceServlet(Object delegate,
+ String sessionCookieName) {
+ super(delegate);
+ this.sessionCookieName = sessionCookieName;
+ }
@Override
public void init() throws ServletException {
=======================================
---
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java
Mon Feb 28 10:45:39 2011
+++
/trunk/user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java
Wed Apr 13 19:08:53 2011
@@ -94,7 +94,7 @@
* public void onSuccess(XsrfToken result) {
* MyRpcServiceAsync rpc =
(MyRpcServiceAsync)GWT.create(MyRpcService.class);
* ((HasRpcToken) rpc).setRpcToken(result);
- * // make XSRF protection RPC calls using
+ * // make XSRF protected RPC call
* rpc.doStuff(new AsyncCallback<Void>() {
* // ...
* });
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors