Sets the {@code HttpMessage} that will be set to the new alert.

@param httpMessage
the {@code HttpMessage} that will be set to the new alert
764190
public void setHttpMessage(HttpMessage httpMessage) {
        this.httpMessage = httpMessage;
        setParamNames(httpMessage.getParamNames());
        this.alertUrl.setText(httpMessage.getRequestHeader().getURI().toString());
        this.historyRef = null;
    }
1137150
@Override
    public void setMessageListener(MessageListener listener) throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setMessageListener", new Object[] { listener });

        try {
            messageConsumer.setMessageListener(listener);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setMessageListener");
        }

    }
1188010
public synchronized void setJobAsFailed(String errorMessage) {
    mJobInfo.setStatus(Status.FAILED);
    mJobInfo.setErrorMessage(errorMessage);
  }
233131
public void setMessagingAuthorizationService(
                                                 MessagingAuthorizationService messagingAuthorizationService) {
        SibTr.entry(tc, CLASS_NAME + "setMessagingAuthorizationService", messagingAuthorizationService);

        this.messagingAuthorizationService = messagingAuthorizationService;

        SibTr.exit(tc, CLASS_NAME + "setMessagingAuthorizationService");
    }
1215966
public void setErrorMessage(String errorMessage) {

        m_errorMessage = errorMessage;
        m_errorLabel.setValue(errorMessage != null ? errorMessage : "");
    }
981433
public Info changeMessage(String newMessage) {
        Info newInfo = new Info();
        newInfo.setMessage(newMessage);

        URL url = COMMENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
        request.setBody(newInfo.getPendingChanges());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject jsonResponse = JsonObject.readFrom(response.getJSON());

        return new Info(jsonResponse);
    }
1049879
public void setWarningMessage(String message) {

        m_messageText.setInnerText(message);
        addStyleName(formCss().hasWarning());
        m_hasError = true;
    }
1201072
private static boolean isLast(HttpMessage httpMessage) {
        if (httpMessage instanceof FullHttpMessage) {
            FullHttpMessage fullMessage = (FullHttpMessage) httpMessage;
            if (fullMessage.trailingHeaders().isEmpty() && !fullMessage.content().isReadable()) {
                return true;
            }
        }

        return false;
    }
1211492
@Override
    public void setGatherMessages(String gatherMessages) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGatherMessages", gatherMessages);

        // Make sure null and empty are treated equally.
        if ((gatherMessages == null) || ("".equals(gatherMessages.trim())))
            gatherMessages = null;

        if ((gatherMessages == null) ||
            (ApiJmsConstants.GATHER_MESSAGES_OFF.equals(gatherMessages) ||
            (ApiJmsConstants.GATHER_MESSAGES_ON.equals(gatherMessages)))) {

            updateProperty(GATHER_MESSAGES, gatherMessages);
        }
        else {
            // bad value, throw exception
            String key = "INVALID_VALUE_CWSIA0281";
            Object[] inserts = new Object[] { GATHER_MESSAGES, gatherMessages };
            throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class, key, inserts, tc);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGatherMessages");
    }
747380
protected void applyErrorMessage(@Nullable CharSequence errorMessage) {
        if (mErrorView instanceof TextView) {
            ((TextView) mErrorView).setText(errorMessage);
        }
    }
1368887
@Override
	public void setMessageListener(MessageListener messageListener) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
    		checkNotClosed();
    		this.messageListener = messageListener;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
311389
protected final void removeMessage(Http2Stream stream, boolean release) {
        FullHttpMessage msg = stream.removeProperty(messageKey);
        if (release && msg != null) {
            msg.release();
        }
    }
1282368
@com.fasterxml.jackson.annotation.JsonProperty("OriginalMessage")
    public void setOriginalMessage(String originalMessage) {
        this.originalMessage = originalMessage;
    }
225707
public void writeHeader(HttpMessage httpMessage) throws IOException
    {
        HttpResponse response=(HttpResponse)httpMessage;
        response.setState(HttpMessage.__MSG_SENDING);

        _ajpResponse.resetData();
        _ajpResponse.addByte(AJP13ResponsePacket.__SEND_HEADERS);
        _ajpResponse.addInt(response.getStatus());
        _ajpResponse.addString(response.getReason());

        int mark=_ajpResponse.getMark();
        _ajpResponse.addInt(0);
        int nh=0;
        Enumeration e1=response.getFieldNames();
        while (e1.hasMoreElements())
        {
            String h=(String)e1.nextElement();
            Enumeration e2=response.getFieldValues(h);
            while (e2.hasMoreElements())
            {
                _ajpResponse.addHeader(h);
                _ajpResponse.addString((String)e2.nextElement());
                nh++;
            }
        }

        if (nh>0)
            _ajpResponse.setInt(mark,nh);
        _ajpResponse.setDataSize();

        write(_ajpResponse);

        _ajpResponse.resetData();
    }
854116
protected final void putMessage(Http2Stream stream, FullHttpMessage message) {
        FullHttpMessage previous = stream.setProperty(messageKey, message);
        if (previous != message && previous != null) {
            previous.release();
        }
    }
1024950
private void doSend(final String gatewayMessage) {
		HttpURLConnection urlConnection = null;

		try {
			if (proxy == null) {
				urlConnection = (HttpURLConnection) gatewayUrl.openConnection();
			} else {
				urlConnection = (HttpURLConnection) gatewayUrl.openConnection(proxy);
			}
			urlConnection.setRequestMethod("POST");
			urlConnection.setDoInput(true);
			urlConnection.setDoOutput(true);
			urlConnection.setReadTimeout(timeoutInMillis);
			urlConnection.setRequestProperty("content-type", "application/json; charset=utf-8");
			urlConnection.setRequestProperty("x-stackdriver-apikey", apiKey);

			// Stackdriver's own implementation does not specify char encoding
			// to use. Let's take the simplest approach and at lest ensure that
			// if we have problems they can be reproduced in consistant ways.
			// See https://github.com/Stackdriver/stackdriver-custommetrics-java/blob/master/src/main/java/com/stackdriver/api/custommetrics/CustomMetricsPoster.java#L262
			// for details.
			urlConnection.getOutputStream().write(gatewayMessage.getBytes(ISO_8859_1));

			int responseCode = urlConnection.getResponseCode();
			if (responseCode != 200 && responseCode != 201) {
				logger.warn("Failed to send results to Stackdriver server: responseCode=" + responseCode + " message=" + urlConnection.getResponseMessage());
			}
		} catch (Exception e) {
			logger.warn("Failure to send result to Stackdriver server", e);
		} finally {
			if (urlConnection != null) {
				try {
					InputStream in = urlConnection.getInputStream();
					in.close();
					InputStream err = urlConnection.getErrorStream();
					if (err != null) {
						err.close();
					}
					urlConnection.disconnect();
				} catch (IOException e) {
					logger.warn("Error flushing http connection for one result, continuing");
					logger.debug("Stack trace for the http connection, usually a network timeout", e);
				}
			}

		}
	}
253372
public void setMessage( Message message ) {
        Assert.notNull(message, "The message is required");
        Assert.hasText( message.getMessage(), "The message text is required" );
        this.message = message;
    }