Package com.ponysdk.ui.terminal.event

Examples of com.ponysdk.ui.terminal.event.HttpResponseReceivedEvent


            requestBuilder.sendRequest(s, new com.google.gwt.http.client.RequestCallback() {

                @Override
                public void onResponseReceived(final Request request, final Response response) {

                    UIBuilder.getRootEventBus().fireEvent(new HttpResponseReceivedEvent());

                    if (response.getStatusCode() != 200) {
                        onError(request, new StatusCodeException(response.getStatusCode(), response.getStatusText()));
                        return;
                    }

                    if (response.getText() == null || response.getText().isEmpty()) return;
                    callback.onDataReceived(JSONParser.parseStrict(response.getText()).isObject());
                }

                @Override
                public void onError(final Request request, final Throwable exception) {
                    UIBuilder.getRootEventBus().fireEvent(new HttpResponseReceivedEvent(exception));
                    callback.onError(exception);
                }
            });

        } catch (final RequestException e) {
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.terminal.event.HttpResponseReceivedEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.