Called when the request is executed successfully on the server

@param response Object received from the execution
543720
public void onExecutionSuccess(ExecutionContext<I> context, O response, ExecutionInfo info) {
        for (ExecutionListener<I, O> listener: listeners) {
            try {
                if (!isListenerDisabled(listener)) {
                    listener.onExecutionSuccess(context.getChildContext(listener), response, info);
                }
            } catch (Throwable e) {
                logger.error("Error invoking listener " + listener, e);
            }
        }
    }
237702
public void releaseResponse(HttpResponseMessageImpl response) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "releaseResponse: " + response);
        }
        this.respPool.put(response);
    }
257654
private void fireResponseReceived(final AbstractBody response) {
        assertUnlocked();

        BOSHMessageEvent event = null;
        for (BOSHClientResponseListener listener : responseListeners) {
            if (event == null) {
                event = BOSHMessageEvent.createResponseReceivedEvent(
                        this, response);
            }
            try {
                listener.responseReceived(event);
            } catch (Exception ex) {
                LOG.log(Level.WARNING, UNHANDLED, ex);
            }
        }
    }
697725
protected void set(ClientResponse response) {
        if (!this.status.compareAndSet(STATUS_RUNNING, STATUS_SUCCESS))
            return;
        this.response = response;
        this.latch.countDown();
    }
488315
@Override
    public void onFailure(Response response, Throwable t, JSONObject extendedInfo) {
        if (isAuthorizationRequired(response)) {
            processResponseWrapper(response, true);
        } else {
            listener.onFailure(response, t, extendedInfo);
        }
    }
608112
protected boolean shouldResponseBeRecordedAsFailure(final HttpServletResponse response) {
        val status = response.getStatus();
        return status != HttpStatus.SC_CREATED && status != HttpStatus.SC_OK && status != HttpStatus.SC_MOVED_TEMPORARILY;
    }
1320273
@Override
	public void onResponse( Object cookie, ResponseJSO response, int msgLevel, String msg )
	{
		PendingRequestInfo info = (PendingRequestInfo) cookie;

		// Store answer in cache
		if( info.fStoreResultInCache )
			cache.put( info.requestKey, response );

		// give the result to all the subscribees
		for( RequestCallInfo call : info.subscriptions )
			call.setResult( msgLevel, msg, null, response );

		// forget this request
		pendingRequests.remove( info );

		// calls back the clients
		checkAnswersToGive();
	}
2099
@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        preProcessRequest(request);

        DefaultServerDolphin serverDolphin = resolveServerDolphin(request);

        String input = readInput(request);
        if (LOG.isLoggable(Level.FINEST)) {
            LOG.finest("received json: " + input);
        }

        List<Command> commands = decodeInput(serverDolphin.getServerConnector().getCodec(), input);

        List<Command> results = handleCommands(serverDolphin.getServerConnector(), commands);

        String output = encodeOutput(serverDolphin.getServerConnector().getCodec(), results);

        writeHeaders(request, response, results);

        if (LOG.isLoggable(Level.FINEST)) {
            LOG.finest("sending json response: " + output);
        }
        writeOutput(response, output);

        postProcessResponse(response);
    }
837869
@SneakyThrows
    public static void render(final HttpServletResponse response) {
        val map = new HashMap<String, Object>();
        response.setStatus(HttpServletResponse.SC_OK);
        render(map, response);
    }
467386
public static void makeResponse(HttpResponse response, String msg, int status) {
        response.setStatusCode(status);
        makeStringResponse(response, msg);
    }
1196655
public void setResponse(Object response)
    {
        ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
        
        if (ctx == null)
        {
            throw new UnsupportedOperationException();
        }
        
        ctx.setResponse(response);
    }
471136
private void handleRequestSuccess(long requestId, Object response, ThreadContext context) {
    ByteBuf buffer = channel.alloc().buffer(10)
      .writeByte(RESPONSE)
      .writeLong(requestId)
      .writeByte(SUCCESS);

    try {
      writeResponse(buffer, response, context);
    } catch (SerializationException e) {
      handleRequestFailure(requestId, e, context);
      return;
    }

    channel.writeAndFlush(buffer, channel.voidPromise());

    if (response instanceof ReferenceCounted) {
      ((ReferenceCounted) response).release();
    }
  }
950237
public void processResponse(ResponseEvent responseEvent) {
		final ResponseEventExt responseEventExt = (ResponseEventExt) responseEvent;
		final Response response = responseEventExt.getResponse();

		if(logger.isDebugEnabled()) {
			logger.debug("Response " + response.toString());
		}

		final CSeqHeader cSeqHeader = (CSeqHeader)response.getHeader(CSeqHeader.NAME);
		//if this is a response to a cancel, the response is dropped
		if(Request.CANCEL.equalsIgnoreCase(cSeqHeader.getMethod())) {
			if(logger.isDebugEnabled()) {
				logger.debug("the response is dropped accordingly to JSR 289 " +
						"since this a response to a CANCEL");
			}
			return;
		}
		// self routing makes the application data cloned, so we make sure to nullify it
		((MessageExt)response).setApplicationData(null);

		updateResponseStatistics(response, true);
		ClientTransaction clientTransaction = responseEventExt.getClientTransaction();
		final Dialog dialog = responseEventExt.getDialog();
		final boolean isForkedResponse = responseEventExt.isForkedResponse();
		final boolean isRetransmission = responseEventExt.isRetransmission();
		final ClientTransactionExt originalTransaction = responseEventExt.getOriginalTransaction();
		if(logger.isDebugEnabled()) {
			logger.debug("is Forked Response " + isForkedResponse);
			logger.debug("is Retransmission " + isRetransmission);
			logger.debug("Client Transaction " + clientTransaction);
			logger.debug("Original Transaction " + originalTransaction);
			logger.debug("Dialog " + dialog);
			if(dialog != null) {
				logger.debug("Dialog State " + dialog.getState());
			}
		}
		// Issue 1468 : Handling forking
		if(isForkedResponse && originalTransaction != null && !responseEventExt.isRetransmission()) {
			final Dialog defaultDialog = originalTransaction.getDefaultDialog();
			final Dialog orginalTransactionDialog = originalTransaction.getDialog();
			if(logger.isDebugEnabled()) {
				logger.debug("Original Transaction Dialog " + orginalTransactionDialog);
				logger.debug("Original Transaction Default Dialog " + defaultDialog);
			}
			clientTransaction = originalTransaction;
		}

		// Transate the response to SipServletResponse
		final SipServletResponseImpl sipServletResponse = (SipServletResponseImpl) sipFactoryImpl.getMobicentsSipServletMessageFactory().createSipServletResponse(
				response,
				clientTransaction,
				null,
				dialog,
				true,
				isRetransmission);
		try {
			messageDispatcherFactory.getResponseDispatcher(sipServletResponse, this).
				dispatchMessage(((SipProvider)responseEvent.getSource()), sipServletResponse);
		} catch (Throwable e) {
			logger.error("An unexpected exception happened while routing the response " +  sipServletResponse, e);
			return;
		}
	}
525177
private void sendReply(Response<ByteString> response) {
    if (!replied.compareAndSet(false, true)) {
      LOGGER.warn("Already replied to ongoing request {} - spurious response {}", request, response);
    } else {
      final HttpServletResponse httpResponse = (HttpServletResponse) asyncContext.getResponse();

      final StatusType status = response.status();
      httpResponse.setStatus(status.code(), status.reasonPhrase());

      response.headerEntries().forEach(entry ->
          httpResponse.addHeader(entry.getKey(), entry.getValue()));

      response.payload().ifPresent(payload -> {
        try {
          payload.write(httpResponse.getOutputStream());
        } catch (IOException e) {
          LOGGER.warn("Failed to write response", e);
        }
      });

      asyncContext.complete();

      logger.accept(this, Optional.of(response));
    }
  }
1128285
private ExecuteResult execute(HttpConnection connection) {

        InputStream inputStream = null; // input stream - response from server on success
        InputStream errorStream = null; // error stream - response from server for a 500 etc
        String responseMessage = null;
        int responseCode = -1;
        Throwable cause = null;

        // first try to execute our request and get the input stream with the server's response
        // we want to catch IOException because HttpUrlConnection throws these for non-success
        // responses (eg 404 throws a FileNotFoundException) but we need to map to our own
        // specific exceptions
        try {
            inputStream = connection.execute().responseAsInputStream();
        } catch (IOException ioe) {
            cause = ioe;
        }

        // response code and message will generally be present together or not all
        try {
            responseCode = connection.getConnection().getResponseCode();
            responseMessage = connection.getConnection().getResponseMessage();
        } catch (IOException ioe) {
            responseMessage = "Error retrieving server response message";
        }

        // error stream will be present or null if not applicable
        errorStream = connection.getConnection().getErrorStream();

        try {
            ExecuteResult executeResult = new ExecuteResult(inputStream,
                    errorStream,
                    responseCode,
                    responseMessage,
                    cause
            );
            return executeResult;
        } finally {
            // don't close inputStream as the callee still needs it
            IOUtils.closeQuietly(errorStream);
        }
    }
1176148
public void handleResponse(String response) {
        if (messageListener != null) {
            log.debug("Sending Http response");
            messageListener.onOutboundMessage(new RawMessage(response), null);
        } else {
            if (log.isDebugEnabled()) {
                log.debug("Sending Http response:" + NEWLINE + response);
            }
        }
    }
622673
function(){
                if (executionChainDone){
                    console.log('execution done !!!')
                    return;
                }
                if (i >= _middleware.length){

                    fn(request,response);
                }
                else{
                    mf = _middleware[i];
                    i++;
                    mf(request,response,next);
                }
            }