GWT-SyncProxy 0.5 Released

PreethumSat, 2015-01-10 10:15

The latest version of the GWT-SyncProxy library has been released. This release has some major revisions, so make sure to take a look at the new Wiki setup on Google Code GitHub to get all the details. In addition to the numerous bug-fixes that have been resolved, here's a quick review of all the new features available in 0.5.

Instead of the old style of service creation:

GreetingService empRpcService =
  SyncProxy.newProxyInstance(GreetingService.class,
        "http://example.com/helloApp", "greet", empSession);

Service creation is more similar to the GWT style for both sync and aSync services:

// Not specifically necessary, but makes it easier to utilize the create methods directly
SyncProxy.setBaseURL("http://127.0.0.1:8888/myapp");
// Note you do not need to cast
GreetingServiceAsync greetService = SyncProxy.create(GreetingService.class);
// Note that in both cases, the non-Async interface is the provided class
GreetingService greetServiceSync = SyncProxy.createSync(GreetingService.class); 

You can utilize multiple sessions with after a bugfix for cookie issues is now resolved:

        CookieManager empSession = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
        CookieManager mgrSession = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
        SyncProxy.setBaseURL("http://example.com/helloApp");
        GreetingServiceAsync empRpcService = SyncProxy.create(GreetingService.class, 
                new ProxySettings().setCookieManager(empSession));
        GreetingService mgrRpcService = SyncProxy.createSync(GreetingService.class,
        new ProxySettings().setCookieManager(mgrSession));

Logging has been enhanced as well. See the Quick Start Guide and Upgrading to 0.5 wiki's for more details. If you're using this library on Android, make sure to visit the Android wiki for Android specific usage (requires a little extra handling to run in the background. 0.6 will have a feature to make this easier with less code).

Updated 2015-03-31: Change Wiki URL's to new GitHub home

Blog Category: