Search in sources :

Example 1 with Synchronizer

use of org.activityinfo.client.local.sync.Synchronizer in project activityinfo by bedatadriven.

the class LocalController method loadSynchronizerImpl.

private void loadSynchronizerImpl(final AsyncCallback<Synchronizer> callback) {
    Log.trace("loadSynchronizerImpl() starting...");
    GWT.runAsync(new RunAsyncCallback() {

        @Override
        public void onFailure(Throwable throwable) {
            Log.trace("loadSynchronizerImpl() failed");
            callback.onFailure(throwable);
        }

        @Override
        public void onSuccess() {
            Log.trace("loadSynchronizerImpl() succeeded");
            Synchronizer impl = null;
            try {
                impl = synchronizerProvider.get();
            } catch (Exception caught) {
                Log.error("SynchronizationImpl constructor threw exception", caught);
                callback.onFailure(caught);
                return;
            }
            callback.onSuccess(impl);
        }
    });
}
Also used : Synchronizer(org.activityinfo.client.local.sync.Synchronizer) RunAsyncCallback(com.google.gwt.core.client.RunAsyncCallback) PermissionRefusedException(org.activityinfo.client.local.capability.PermissionRefusedException)

Aggregations

RunAsyncCallback (com.google.gwt.core.client.RunAsyncCallback)1 PermissionRefusedException (org.activityinfo.client.local.capability.PermissionRefusedException)1 Synchronizer (org.activityinfo.client.local.sync.Synchronizer)1