Simple demo http://gwt-rf-queue.appspot.com/ with gwt-rf-queue retrofitted to DynaTableRf.
Pure GWT/Java RequestFactory module for:
- GMail like network retry.
- Detect/retry auth failure.
- Can drive the UI to indicate the RequestFactory is busy or idle.
- Different "quality of service" for different requests.
- Mechanism to send the contents of an Editor tree to the server multiple times and fire different service methods. e.g. to support background validation on the server
- TODO - Semi-respectable unit test coverage.
- TODO - Raise GWT feature requests to add hooks to remove the worst work arounds e.g. custom Processor.
- TODO - Rename AuthFailureDetector to something more generic about "response detector"?
- TODO - Make the demo do something more realistic on auth failure.
- TODO - Put in maven central.
- Inherit the module in your gwt.xml file:
<inherits name='uk.ac.diamond.gwt.rf.queue.GwtRfQueue' />
- Wire up the manager on the client (very minimal, will just do network retry, no UI):
RequestFactory requestFactory = ...
QosRequestTransport transport = new QosRequestTransport();
QosManager manager = new QosManager();
manager.setRequestTransport(transport);
QosQueue root = new QosQueue();
root.setTarget(manager);
manager.start();
transport.setDefaultSource(root);
requestFactory.initialize(eventBus, transport);
- Reference the decorated servlet in your web.xml file:
<servlet>
<servlet-name>requestFactoryServlet</servlet-name>
<servlet-class>uk.ac.diamond.gwt.rf.queue.server.QosRequestFactoryServlet</servlet-class>
</servlet>