Update the current message of the service task related to the given wave.

@param wave the wave that trigger the service task call
@param message the current message of the service task processed
2476
public void updateMessage(final Wave wave, final String message) {

        // Update the current task message
        JRebirth.runIntoJAT("Service Task Mesage => " + message,
                            () -> wave.get(JRebirthWaves.SERVICE_TASK).updateMessage(message));
    }
819361
protected void setProgressMessage(final String message) {
		runOnUiThread(new Runnable() {
			public void run() {
				synchronized ( lockProgress ) {
					if( progressDialog != null ) {
						// a dialog is already open, change the message
						progressDialog.setMessage(message);
						return;
					}
					progressDialog = new ProgressDialog(VideoDisplayActivity.this);
					progressDialog.setMessage(message);
					progressDialog.setIndeterminate(true);
					progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
				}

				// don't show the dialog until 1 second has passed
				long showTime = System.currentTimeMillis()+1000;
				while( showTime > System.currentTimeMillis() ) {
					Thread.yield();
				}
				// if it hasn't been dismissed, show the dialog
				synchronized ( lockProgress ) {
					if( progressDialog != null )
						progressDialog.show();
				}
			}});

		// block until the GUI thread has been called
		while( progressDialog == null  ) {
			Thread.yield();
		}
	}
602250
public void receive(WSMessage message) {
        log.trace("receive message");
        if (isConnected()) {
            WebSocketPlugin plugin = (WebSocketPlugin) PluginRegistry.getPlugin("WebSocketPlugin");
            Optional<WebSocketScopeManager> optional = Optional.ofNullable((WebSocketScopeManager) session.getAttribute(Constants.MANAGER));
            WebSocketScopeManager manager = optional.isPresent() ? optional.get() : plugin.getManager(path);
            WebSocketScope scope = manager.getScope(path);
            scope.onMessage(message);
        } else {
            log.warn("Not connected");
        }
    }
1174565
public void appendAsync(final String message) {
		EventQueue.invokeLater(new Runnable() {

			@Override
			public void run() {
				doAppend(message);
			}
		});
	}
378664
@Override
    public void onMessage(String channel, Message message) {
        if (MessageUtil.isMessageExcluded(message, RecipientType.CONSUMER, nodeId)) {
            return;
        }
        
        if (updateDelivered(message)) {
            LinkedHashSet<IMessageCallback> callbacks = getCallbacks(channel, false, true);
            
            if (callbacks != null) {
                dispatchMessages(channel, message, callbacks);
            }
        }
    }
572121
public void setMessage(String message) {
    pushData.clear();
    Map<String, Object> map = AVUtils.createStringObjectMap("alert", message);
    pushData.put("data", map);
  }
928160
public int handleMessage(BaseMessage message)
    {
            try   {
                int iMessageType = Integer.parseInt((String)message.get(MessageConstants.MESSAGE_TYPE_PARAM));
                if ((iMessageType == Constants.AFTER_UPDATE_TYPE)
                        || (iMessageType == Constants.CACHE_UPDATE_TYPE))
                    { // Record updated - be very careful, you are running in an independent thread.
                        SwingUtilities.invokeLater(new UpdateScreenRecord(iMessageType));
                    }
            } catch (NumberFormatException ex)  {
                // Ignore
            }
        return super.handleMessage(message);
    }
368052
public synchronized void sendMessage(final byte[] message) {
    this.send(ReefServiceProtos.JobStatusProto.newBuilder()
        .setIdentifier(this.jobIdentifier)
        .setState(ReefServiceProtos.State.RUNNING)
        .setMessage(ByteString.copyFrom(message))
        .build());
  }
70953
public void onReceive(Object message) {

        // Start all workers
        if (message instanceof RequestToBatchSenderAsstManager) {

            // clear responseMap

            RequestToBatchSenderAsstManager request = (RequestToBatchSenderAsstManager) message;
            originalManager = getSender();
            taskId = request.getTaskId();
            asstManagerRetryIntervalMillis = request
                    .getAsstManagerRetryIntervalMillis();
            // assumption: at least 12
            taskIdTrim = taskId.length() <= 12 ? taskId
                    : taskId.substring(taskId.length() - 12,
                            taskId.length());
            workers = request.getWorkers();
            maxConcurrencyAdjusted = request.getMaxConcurrency();

            requestTotalCount = workers.size();

            sendMessageUntilStopCount(maxConcurrencyAdjusted);

            // if not completed; will schedule a continue send msg
            if (processedWorkerCount < requestTotalCount) {

                waitAndRetry();
                return;
            } else {
                logger.info("Now finished sending all needed messages. Done job of ASST Manager at "
                        + PcDateUtils.getNowDateTimeStrStandard());
                return;
            }
        } else if (message instanceof ContinueToSendToBatchSenderAsstManager) {

            // now reaching the end; have processed all of them, just waiting
            // the response to come back
            int notProcessedNodeCount = requestTotalCount
                    - processedWorkerCount;
            if (notProcessedNodeCount <= 0) {
                logger.info("!Finished sending all msg in ASST MANAGER at "
                        + PcDateUtils.getNowDateTimeStrStandard()

                        + " STOP doing wait and retry.");
                return;
            }

            int extraSendCount = maxConcurrencyAdjusted
                    - (processedWorkerCount - responseCount);

            if (extraSendCount > 0) {
                logger.info("HAVE ROOM to send extra of : " + extraSendCount
                        + " MSG. now Send at "
                        + PcDateUtils.getNowDateTimeStrStandard());

                sendMessageUntilStopCount(processedWorkerCount + extraSendCount);
                waitAndRetry();
            } else {
                logger.info("NO ROOM to send extra. Windowns is full. extraSendCount is negative: "
                        + extraSendCount
                        + " reschedule now at "
                        + PcDateUtils.getNowDateTimeStrStandard());
                waitAndRetry();

            }
        } else if (message instanceof ResponseCountToBatchSenderAsstManager) {

            responseCount = ((ResponseCountToBatchSenderAsstManager) message)
                    .getResponseCount();

            logger.debug("RECV IN batchSenderAsstManager FROM ExecutionManager responseCount: "
                    + responseCount);

        }
    }
781412
public int sendMessage(Message message)
    {
        BaseMessageHeader messageHeader = ((BaseMessage)message).getMessageHeader();
        String strQueueType = messageHeader.getQueueType();
        String strQueueName = messageHeader.getQueueName();
        MessageSender sender = this.getMessageQueue(strQueueName, strQueueType).getMessageSender();
        if (sender != null)
            sender.sendMessage(message);
        else
            return Constant.ERROR_RETURN;  // Queue doesn't exist
        return Constant.NORMAL_RETURN;
    }
260923
private void doPushMessage(AbstractMessage message) {
        if (log.isTraceEnabled()) {
            String msgType = message.getMessageType();
            log.trace("doPushMessage: {}", msgType);
        }
        IMessageOutput out = msgOutReference.get();
        if (out != null) {
            try {
                out.pushMessage(message);
                if (message instanceof RTMPMessage) {
                    IRTMPEvent body = ((RTMPMessage) message).getBody();
                    // update the last message sent's timestamp
                    lastMessageTs = body.getTimestamp();
                    IoBuffer streamData = null;
                    if (body instanceof IStreamData && (streamData = ((IStreamData<?>) body).getData()) != null) {
                        bytesSent.addAndGet(streamData.limit());
                    }
                }
            } catch (IOException err) {
                log.warn("Error while pushing message", err);
            }
        } else {
            log.warn("Push message failed due to null output pipe");
        }
    }
1148514
protected void dispatchMessage (Message message)
    {
        _messagesIn++; // count 'em up!

        // we dispatch to a message dispatcher that is specialized for the particular class of
        // message that we received
        MessageDispatcher disp = _disps.get(message.getClass());
        if (disp == null) {
            log.warning("No dispatcher for message", "msg", message);
            return;
        }

        // otherwise pass the message on to the dispatcher
        disp.dispatch(this, message);
    }
199673
public void suspend(final byte[] message) {
    synchronized (this.heartBeatManager) {
      if (this.currentStatus.isNotRunning()) {
        LOG.log(Level.WARNING, "Trying to suspend a task that is in state: {0}. Ignoring.",
            this.currentStatus.getState());
      } else {
        try {
          this.suspendTask(message);
          this.currentStatus.setSuspendRequested();
        } catch (final TaskSuspendHandlerFailure taskSuspendHandlerFailure) {
          LOG.log(Level.WARNING, "Exception while executing task suspend handler.",
              taskSuspendHandlerFailure.getCause());
          this.currentStatus.setException(taskSuspendHandlerFailure.getCause());
        }
      }
    }
  }
1341194
public void publishInternal(Object message) {
        topicStats.incrementPublishes();
        topicService.publishMessage(name, message, multithreaded);
    }
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);
	}
180931
public void didSendMessage(final String message, final Date timestamp) {
        new Handler(Looper.getMainLooper()).post(new Runnable() {
            @Override
            public void run() {
                if (null != listenerReference) {
                    Listener listener = listenerReference.get();
                    if (null != listener) {
                        listener.onMessage(message, timestamp, RespokeEndpoint.this, true);
                    }
                }
            }
        });
    }
1227748
public void setAlertMessage(final String MESSAGE) {
        if (null == alertMessage) {
            _alertMessage = MESSAGE;
            fireUpdateEvent(ALERT_EVENT);
        } else {
            alertMessage.set(MESSAGE);
        }
    }