Convenience method to add a message to a message box.

@param box the message box to add the message to
@param message the message to add
@param encode true to encode the message, false otherwise.
976623
private void addMessage(final WMessageBox box, final Message message, final boolean encode) {
		String code = message.getMessage();

		if (!Util.empty(code)) {
			box.addMessage(encode, code, message.getArgs());
		}
	}
1029209
public void setMessage(String message) {
        this.message = message;
        if (errorMessage == null) {
            logger.debug("Setting status bar message to \"" + message + "\"");
            messageLabel.setText(this.message);
        }
    }
1307392
private void sendMessage(Message message) throws IOException {
        logger.debug("Sending> {}", message);
        int totalSize = 0;
        for (Field field : message.fields) {
            totalSize += field.getBytes().remaining();
        }
        ByteBuffer combined = ByteBuffer.allocate(totalSize);
        for (Field field : message.fields) {
            logger.debug("..sending> {}", field);
            combined.put(field.getBytes());
        }
        combined.flip();
        Util.writeFully(combined, channel);
    }
145052
public static void addBody(Message message, XHTMLText xhtmlText) {
        XHTMLExtension xhtmlExtension = XHTMLExtension.from(message);
        if (xhtmlExtension == null) {
            // Create an XHTMLExtension and add it to the message
            xhtmlExtension = new XHTMLExtension();
            message.addExtension(xhtmlExtension);
        }
        // Add the required bodies to the message
        xhtmlExtension.addBody(xhtmlText.toXML());
    }
716663
public void setBox(Rectangle box) {
    	if (box == null) {
    		this.box = null;
    	}
    	else {
    		this.box = new Rectangle(box);
    		this.box.normalize();
    	}
    }
786397
public static void addMessage(final HttpServletRequest request, final String message) {
		StringBuilder sb = (StringBuilder) request.getAttribute(MESSAGE_KEY);
		if (sb == null) {
			sb = new StringBuilder();
			request.setAttribute(MESSAGE_KEY, sb);
		}
		sb.append(message);
	}
817855
public void onMessage(final byte[] message, final Session session) {
        final SynchronizeFXWebsocketChannel channel = getChannelOrFail(session);

        channel.newMessage(message, session);
    }
1163270
private function encodeMessage(Message $message, $code)
    {
        return $this->connection->encode(Protobuf::encode($message), $code);
    }
1321249
public void sendMessage(final String message) {
        try {
            session.sendMessage(new TextMessage(message));
        }
        catch (IOException e) {
            logger.error("[sendTextMessage]", e);
        }
    }
1345257
@Override
  public void write(final T message) {
    LOG.log(Level.FINEST, "write {0} :: {1}", new Object[] {channel, message});
    final ChannelFuture future = channel.writeAndFlush(Unpooled.wrappedBuffer(encoder.encode(message)));
    if (listener !=  null) {
      future.addListener(new NettyChannelFutureListener<>(message, listener));
    }
  }
1317857
public static void showMessage(String message, String caption) {
        getShell().getMessageWindow().showMessage(message, caption);
    }
107812
protected Element marshallMessage(XMLObject message) throws MessageEncodingException {
        log.debug("Marshalling message");

        try {
            return XMLObjectSupport.marshall(message);
        } catch (MarshallingException e) {
            throw new MessageEncodingException("Error marshalling message", e);
        }
    }
758292
protected function appendMessage(Message $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > 100) {
            array_shift($this->messages);
        }
    }
726163
private static void addHeadersToMessage(SipServletMessage message, Map<String, String> customHeaders) {
         for (Map.Entry<String, String> entry: customHeaders.entrySet()) {
             String headerName = entry.getKey();
             String headerVal = entry.getValue();
             message.addHeader(headerName, headerVal);
         }
     }
1033435
@Override
    public void addHeader(String name, String value) {
        this.message.appendHeader(name, value);
    }
634776
public void sendMessage(final byte[] message) {
        try {
            session.sendMessage(new BinaryMessage(message));
        }
        catch (IOException e) {
            logger.error("[sendBinaryMessage]", e);
        }
    }
1193215
public void init(BaseMessage message, Object objRawMessage)
    {
        m_message = message;
        if (message != null)
            message.setExternalMessage(this);
        if (objRawMessage != null)
            this.setRawData(objRawMessage);
    }