Examples of onCompleted()


Examples of org.asynchttpclient.AsyncHandler.onCompleted()

                if (handler != null) {
                    context.setCurrentState(handler.onStatusReceived(responseStatus));
                    if (context.isWSRequest() && context.getCurrentState() == ABORT) {
                        httpHeader.setSkipRemainder(true);
                        try {
                            context.result(handler.onCompleted());
                            context.done();
                        } catch (Throwable e) {
                            context.abort(e);
                        }
                    }
View Full Code Here

Examples of org.asynchttpclient.AsyncHandler.onCompleted()

        final HttpTxContext context = HttpTxContext.get(ctx);
        cleanup(ctx);
        final AsyncHandler handler = context.getHandler();
        if (handler != null) {
            try {
                context.result(handler.onCompleted());
            } catch (Throwable e) {
                context.abort(e);
            }
        } else {
            context.done();
View Full Code Here

Examples of org.asynchttpclient.websocket.WebSocketUpgradeHandler.onCompleted()

            status = new NettyResponseStatus(future.getUri(), config, response);
            final boolean statusReceived = handler.onStatusReceived(status) == STATE.UPGRADE;

            if (!statusReceived) {
                try {
                    handler.onCompleted();
                } finally {
                    future.done();
                }
                return;
            }
View Full Code Here

Examples of org.asynchttpclient.websocket.WebSocketUpgradeHandler.onCompleted()

            future.done();

        } else if (e instanceof WebSocketFrame) {

            final WebSocketFrame frame = (WebSocketFrame) e;
            NettyWebSocket webSocket = NettyWebSocket.class.cast(handler.onCompleted());
            invokeOnSucces(channel, handler);

            if (webSocket != null) {
                if (frame instanceof CloseWebSocketFrame) {
                    Channels.setDiscard(channel);
View Full Code Here

Examples of org.asynchttpclient.websocket.WebSocketUpgradeHandler.onCompleted()

        logger.warn("onError {}", e);

        try {
            WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future);

            NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted());
            if (webSocket != null) {
                webSocket.onError(e.getCause());
                webSocket.close();
            }
        } catch (Throwable t) {
View Full Code Here

Examples of org.asynchttpclient.websocket.WebSocketUpgradeHandler.onCompleted()

    public void onClose(NettyResponseFuture<?> future) {
        logger.trace("onClose {}");

        try {
            WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future);
            NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted());

            logger.trace("Connection was closed abnormally (that is, with no close frame being sent).");
            if (webSocket != null)
                webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent).");
        } catch (Throwable t) {
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator.onCompleted()

         new SimpleRequestCallback<SavePlotAsImageContext>() {

            @Override
            public void onResponseReceived(SavePlotAsImageContext context)
            {
               indicator.onCompleted();

               new SaveViewerPlotAsImageDesktopDialog(
                   globalDisplay_,
                   display_.getUrl(),
                   context,
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator.onCompleted()

                        template.getTemplatePath());
                  prefs_.writeUIPrefs();
                  FileSystemItem file =
                        FileSystemItem.createFile(created.getPath());
                  eventBus_.fireEvent(new FileEditEvent(file));
                  progress.onCompleted();
               }

               @Override
               public void onError(ServerError error)
               {
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator.onCompleted()

         new SimpleRequestCallback<SavePlotAsImageContext>() {

            @Override
            public void onResponseReceived(SavePlotAsImageContext context)
            {
               indicator.onCompleted();

               exportPlot_.savePlotAsImage(globalDisplay_,
                     server_,
                     context,
                     ExportPlotOptions.adaptToSize(
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator.onCompleted()

         new SimpleRequestCallback<String>() {

            @Override
            public void onResponseReceived(String stem)
            {
               indicator.onCompleted();

               Size size = getPlotSize();
               final SavePlotAsPdfOptions currentOptions =
                   SavePlotAsPdfOptions.adaptToSize(
                         uiPrefs_.get().savePlotAsPdfOptions().getValue(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.