Send a message as SSH request. The message format is created from
{@link com.consol.citrus.ssh.server.SshServer}.

@param message the message object to send.
@param context
339777
public void send(Message message, TestContext context) {
        String correlationKeyName = getEndpointConfiguration().getCorrelator().getCorrelationKeyName(getName());
        String correlationKey = getEndpointConfiguration().getCorrelator().getCorrelationKey(message);
        correlationManager.saveCorrelationKey(correlationKeyName, correlationKey, context);

        SshRequest request = (SshRequest) getEndpointConfiguration().getMessageConverter().convertOutbound(message, getEndpointConfiguration(), context);

        if (getEndpointConfiguration().isStrictHostChecking()) {
            setKnownHosts();
        }

        String rUser = getRemoteUser(message);
        connect(rUser);
        ChannelExec channelExec = null;
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
        ByteArrayOutputStream errStream = new ByteArrayOutputStream();
        int rc;
        try {
            channelExec = openChannelExec();
            channelExec.setErrStream(errStream);
            channelExec.setOutputStream(outStream);
            channelExec.setCommand(request.getCommand());
            doConnect(channelExec);
            if (request.getStdin() != null) {
                sendStandardInput(channelExec, request.getStdin());
            }
            waitCommandToFinish(channelExec);
            rc = channelExec.getExitStatus();
        } finally {
            if (channelExec != null && channelExec.isConnected()) {
                channelExec.disconnect();
            }
            disconnect();
        }
        SshResponse sshResp = new SshResponse(outStream.toString(),errStream.toString(),rc);
        Message response = getEndpointConfiguration().getMessageConverter().convertInbound(sshResp, getEndpointConfiguration(), context)
                .setHeader("user", rUser);

        correlationManager.store(correlationKey, response);
    }
736058
public Boolean send(String message) {
        TextWebSocketFrame frame = new TextWebSocketFrame(message);
        if (getCh() != null) {
            getCh().writeAndFlush(frame);
            return true;
        }
        return false;
    }
196804
public void sendMessage(Message message) throws NotConnectedException, InterruptedException {
        message.setTo(room);
        message.setType(Message.Type.groupchat);
        connection.sendStanza(message);
    }
961733
public void sendMessage(String message){

		byte[] datagramData = message.getBytes();
		datagramPacket.setData(datagramData);

		try {
			datagramSocket.send(datagramPacket);
		} catch (IOException e) {
			Log.e(TAG, "Failed to send datagram log " + e);
		}
	}
1297394
protected Message createMessage(ConnectionContext context, BasicMessage basicMessage) throws JMSException {
        return createMessage(context, basicMessage, null);
    }
624829
public void sendMessage(Message message)
    {
        try   {
            if (((RemoteMessageQueue)this.getMessageQueue()).isSendRemoteMessage((BaseMessage)message) == false)
                return;
            if (((BaseMessage)message).isProcessedByServer())
                return;     // Don't send back down (the server already processed it).
            if (((BaseMessage)message).isConsumed())
                return;     // Don't send if already handled.
            if (MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(((BaseMessage)message).getMessageHeader().getQueueType()))
                return;     // Local queue only
            synchronized (m_sendQueue)
            {   // In case this is called from another task
                m_sendQueue.sendMessage(message);
            }
        } catch (RemoteException ex)    {
            ex.printStackTrace();
        }
    }
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);
	}
77590
private void sendMessage(org.isoblue.isobus.Message message) {
        // Check that we're actually connected before trying anything
        if (mChatService.getState() != BluetoothService.STATE_CONNECTED) {
            Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT)
                    .show();
            return;
        }

        // Get the message bytes and tell the BluetoothChatService to write
        mChatService.write(message);

        // Reset out string buffer to zero and clear the edit text field
        mOutStringBuffer.setLength(0);
    }
1222649
public void sendMessage(Message message) throws RemoteException
    {
        Utility.getLogger().info("EJB sendMessage: " + message);
        if (((BaseMessage)message).isProcessedByClient())
            ((BaseMessage)message).setProcessedByClientSession(this.getParentSession());
        m_messageSender.sendMessage(message);
    }
483190
public final void contextDestroyed(final ServletContextEvent sce) {
		// Stop the TciIpServer
		if (this.tcpIpServer != null) {
			this.tcpIpServer.stop();
		}

		// Stop the JmxServer
		if (this.jmxServer != null) {
			this.jmxServer.stop();
		}

		// Stop the SshServer
		if (this.sshServer != null) {
			try {
				this.sshServer.stop();
			} catch (InterruptedException e) {
				LaunchingMessageKind.ESSH0002.format(e);
			}
		}
	}
665816
public void reply(Object message) {
        if (context.sender() != null) {
            context.sender().send(message, self());
        }
    }
228314
public function debug($message, array $context = []) : void
    {
        /** @psalm-suppress UndefinedClass */
        SspLogger::debug($message.($context ? " ".var_export($context, true) : ""));
    }
687871
public void sendMessage(Message message)
    {
        ((DualMessageQueue)this.getMessageQueue()).getMessageStack().sendMessage(message);
        
        ((BaseMessage)message).setProcessedByClient(true);     // Make sure any server doesn't send this back up.

        super.sendMessage(message);
    }
1154222
async def connect_message(self, message, context):
        
        conn_string = message.get('connection_string')
        client_id = context.user_data

        await self.connect(client_id, conn_string)
983992
public void setMessage(String message) {
        requireArgument(message != null && !message.isEmpty(), "Message cannot be null or empty.");
        this.message = message;
    }
12578
public String reformat(final Map<String, String> context, final String message) {
        final HashMap<String, String> tokens = new HashMap<String, String>();
        if (null != context) {
            tokens.putAll(context);
        }
        if (null != generator) {
            tokens.putAll(generator.getMap());
        } else if(null!=data) {
            tokens.putAll(data);
        }
        final String[] arr = {
            null!= tokens.get("user")? tokens.get("user"):"",
            null != tokens.get("node") ? tokens.get("node") : "",
            null != tokens.get("command") ? tokens.get("command") : "",
            tokens.get("level"),
            message
        };
        synchronized (messageFormat){
            return messageFormat.format(arr);
        }
    }
639399
public void send(final Command msg) throws HandlerSocketException {
		Session session = this.selectSession();
		session.write(msg);
	}