public <T, R> T call(final RemoteCallback<R> callback, final BusErrorCallback errorCallback, final Class<T> remoteService) { final T svc = proxyFactory.getRemoteProxy(remoteService); ((RpcStub) svc).setRemoteCallback(callback); ((RpcStub) svc).setErrorCallback(errorCallback); return svc; }
@SuppressWarnings("unchecked") public void sendRequest(final MessageBus bus, final RemoteCallSendable sendable) { if (batch != null) { batch.addRequest(sendable); } else { sendable.sendNowWith(bus); } }
public void onClick(ClickEvent event) { callback.callback(messageReturned, null); } }
@Override public <T> T call(final RemoteCallback<?> callback, final ErrorCallback<?> errorCallback, final Class<T> remoteService) { final T proxy = factory.getRemoteProxy(remoteService); ((RpcStub) proxy).setRemoteCallback(new BatchRemoteCallback(batch, callback)); ((RpcStub) proxy).setErrorCallback(new BatchErrorCallback(batch, errorCallback)); ((RpcStub) proxy).setBatch(batch); return proxy; }
@Override public Object call(final RemoteCallback<?> callback, final ErrorCallback<?> errorCallback) { final Object proxy = factory.getRemoteProxy(typeargs[0]); ((RpcStub) proxy).setRemoteCallback(wrap(callback)); ((RpcStub) proxy).setErrorCallback(wrap(errorCallback)); ((RpcStub) proxy).setQualifiers(qualifiers); return proxy; }
@Override public Object call() { final Object proxy = factory.getRemoteProxy(typeargs[0]); ((RpcStub) proxy).setRemoteCallback(new NoOpCallback()); ((RpcStub) proxy).setQualifiers(qualifiers); return proxy; }
if (ClientCSRFTokenCache.hasAssignedCSRFToken()) builder.setHeader(ERRAI_CSRF_TOKEN_HEADER, ClientCSRFTokenCache.getAssignedCSRFToken());
final String assignedCSRFToken = response.getHeader(ERRAI_CSRF_TOKEN_HEADER); if (assignedCSRFToken != null) { ClientCSRFTokenCache.setAssignedCSRFToken(assignedCSRFToken); txRetries++; undeliveredMessages.removeAll(toSend);
baseUrl += "/"; T proxy = proxyProvider.getRemoteProxy(remoteService);
@Override @SuppressWarnings({ "unchecked" }) public <T> T getRemoteProxy(final Class<T> proxyType) { Assert.notNull(proxyType); if (remoteProxyProviders.isEmpty()) { throw new RuntimeException("There are no proxy providers registered.\n" + "Hint: You may need to move this call to an @AfterInitialization method."); } final ProxyProvider proxyProvider = remoteProxyProviders.get(proxyType); if (proxyProvider == null) { throw new RuntimeException("No proxy provider found for type [" + proxyType.getName() + "].\n" + "Hint: Did you just add a new remote interface? The GWT generator may not have run in which case you should try:\n" + "\t1. Touching an RPC interface that already has a proxy and refreshing (i.e. run `touch RemoteInterface.java`).\n" + "\t2. Clear your Super Dev Mode cache (go to 127.0.0.1:9876 and click \"clear cache\").\n" + "\t3. Run Super Dev Mode without incremental compilation."); } final Object proxy = proxyProvider.getProxy(); if (proxy == null) { throw new RuntimeException("No proxy instance provided for: " + proxyType.getName()); } return (T) proxy; }
@Override public <T> T call(final RemoteCallback<?> callback, final ErrorCallback<?> errorCallback, final Class<T> remoteService) { final T proxy = factory.getRemoteProxy(remoteService); ((RpcStub) proxy).setRemoteCallback(new BatchRemoteCallback(batch, callback)); ((RpcStub) proxy).setErrorCallback(new BatchErrorCallback(batch, errorCallback)); ((RpcStub) proxy).setBatch(batch); return proxy; }
public <T, R> T call(final RemoteCallback<R> callback, final BusErrorCallback errorCallback, final Class<T> remoteService) { final T svc = proxyFactory.getRemoteProxy(remoteService); ((RpcStub) svc).setRemoteCallback(callback); ((RpcStub) svc).setErrorCallback(errorCallback); return svc; }
@Override public Object call(final RemoteCallback<?> callback) { final Object proxy = factory.getRemoteProxy(typeargs[0]); ((RpcStub) proxy).setRemoteCallback(wrap(callback)); ((RpcStub) proxy).setQualifiers(qualifiers); return proxy; }
if (ClientCSRFTokenCache.hasAssignedCSRFToken()) { requestBuilder.setHeader(Constants.ERRAI_CSRF_TOKEN_HEADER, ClientCSRFTokenCache.getAssignedCSRFToken());
public void callback(Object message, Object data) { if (callbackTo != null) callbackTo.callback(message, data); try { window.hide(); } catch (AssertionError ae) { } }
final int statusCode = response.getStatusCode(); if (firstTry && statusCode == 403 && response.getHeader(Constants.ERRAI_CSRF_TOKEN_HEADER) != null) { ClientCSRFTokenCache.setAssignedCSRFToken(response.getHeader(Constants.ERRAI_CSRF_TOKEN_HEADER)); sendRequest(requestBuilder, requestBody, demarshallingCallback, false);
@SuppressWarnings("unchecked") public void sendRequest(final MessageBus bus, final RemoteCallSendable sendable) { if (batch != null) { batch.addRequest(sendable); } else { sendable.sendNowWith(bus); } }
@Override @SuppressWarnings({ "unchecked" }) public <T> T getRemoteProxy(final Class<T> proxyType) { Assert.notNull(proxyType); if (remoteProxyProviders.isEmpty()) { throw new RuntimeException("There are no proxy providers registered.\n" + "Hint: You may need to move this call to an @AfterInitialization method."); } final ProxyProvider proxyProvider = remoteProxyProviders.get(proxyType); if (proxyProvider == null) { throw new RuntimeException("No proxy provider found for type [" + proxyType.getName() + "].\n" + "Hint: Did you just add a new remote interface? The GWT generator may not have run in which case you should try:\n" + "\t1. Touching an RPC interface that already has a proxy and refreshing (i.e. run `touch RemoteInterface.java`).\n" + "\t2. Clear your Super Dev Mode cache (go to 127.0.0.1:9876 and click \"clear cache\").\n" + "\t3. Run Super Dev Mode without incremental compilation."); } final Object proxy = proxyProvider.getProxy(); if (proxy == null) { throw new RuntimeException("No proxy instance provided for: " + proxyType.getName()); } return (T) proxy; }
public void callback(Object message, Object data) { callbackTo.callback(message, data ); window.hide(); }
public void onWindowClosing(Window.ClosingEvent event) { if (callbackTo != null) callbackTo.callback("WindowClosed", null); RootPanel.get().remove(drapePanel); } });