Construct the message the vacuum sends to the controlling device.
@return The constructed message.
557566
public JSONArray construct(){
        JSONArray ret = new JSONArray();
        ret.put(start.getMillis() / 1000);
        ret.put(end.getMillis() / 1000);
        ret.put(runtime);
        ret.put(area);
        ret.put(0);
        ret.put(completed ? 1 : 0);
        return ret;
    }
5087
public AbstractMessageContentBuilder constructMessageBuilder(Element messageElement) {
        AbstractMessageContentBuilder messageBuilder = null;
        
        if (messageElement != null) {
            messageBuilder = parsePayloadTemplateBuilder(messageElement);
            
            if (messageBuilder == null) {
                messageBuilder = parseScriptBuilder(messageElement);
            }
        }

        if (messageBuilder == null) {
            messageBuilder = new PayloadTemplateMessageBuilder();
        }

        if (messageElement != null && messageElement.hasAttribute("name")) {
            messageBuilder.setMessageName(messageElement.getAttribute("name"));
        }

        return messageBuilder;
    }
1184753
protected static String buildMessage(String msg) {
        StackTraceElement caller = new Throwable().fillInStackTrace().getStackTrace()[2];
        return caller.getClassName() + "." + caller.getMethodName() + "(): \n" + msg;
    }
933176
@Override
    public SegmentationMessage createSGM() {
        SegmentationMessage msg = new SegmentationMessageImpl(_SGM_HOLDER.mandatoryCodes,
                _SGM_HOLDER.mandatoryVariableCodes, _SGM_HOLDER.optionalCodes, _SGM_HOLDER.mandatoryCodeToIndex,
                _SGM_HOLDER.mandatoryVariableCodeToIndex, _SGM_HOLDER.optionalCodeToIndex);
        return msg;
    }
951065
def construct(self, force=False):
        
        message = super().construct(force=force)

        # Add tags.
        if self.tags:
            raw_tags = []
            for tag, value in self.tags.items():
                if value == True:
                    raw_tags.append(tag)
                else:
                    raw_tags.append(tag + TAG_VALUE_SEPARATOR + value)

            message = TAG_INDICATOR + TAG_SEPARATOR.join(raw_tags) + ' ' + message

        if len(message) > TAGGED_MESSAGE_LENGTH_LIMIT and not force:
            raise protocol.ProtocolViolation('The constructed message is too long. ({len} > {maxlen})'.format(len=len(message), maxlen=TAGGED_MESSAGE_LENGTH_LIMIT), message=message)
        return message
617560
protected SubscriptionMessage generateGenericSubscriptionMessage() {

		SubscriptionMessage subMessage = new SubscriptionMessage();
		subMessage.setRules(this.rules);
		subMessage.setMessageType(SubscriptionMessage.SUBSCRIPTION_MESSAGE_ID);

		return subMessage;
	}
595279
public String getMessage() {
        Throwable rock = getUndeclaredThrowable();
        if (rock != null) {
            return rock.getMessage();
        }
        else {
            return super.getMessage();
        }
    }
894800
public String getMessage() {
        if ( this.cause == null ) {
            return super.getMessage() + " Line number: " + this.lineNumber;
        } else {
            return super.getMessage() + " Line number: " + this.lineNumber + ". Caused by: " + this.cause.getMessage();
        }
    }
395690
public Message5WH build(){
		return new Message5WH(this.who, this.what, this.whereLocation, this.whereLine, this.whereColumn, this.when, this.why, this.how, this.reporter, this.type);
	}
1348696
public byte[] getMessage() {
        byte result[] = new byte[3 + m_length];
        int offset = 0;

        result[offset++] = (byte)(m_length + 2);
        result[offset++] = (byte)m_slaveId;
        result[offset++] = (byte)m_status;
        if (m_length > 0) {
            System.arraycopy(m_data, 0, result, offset, m_length - 2);
        }

        return result;
    }
702447
public byte[] getMessage() {
        byte result[] = new byte[4];

        result[0] = (byte)(function >> 8);
        result[1] = (byte)(function & 0xFF);
        result[2] = (byte)(data >> 8);
        result[3] = (byte)(data & 0xFF);

        return result;
    }
1117766
public BaseMessageReceiver getMessageReceiver()
    {
        if (m_receiver == null)
        {
            m_receiver = this.createMessageReceiver();
            if (m_receiver != null)
                new Thread(m_receiver, "MessageReceiver").start();
        }
        return m_receiver;
    }
656660
public String getMessage()
    {
        String base = super.getMessage();

        if( null == base )
        {
            return "Failed to access " + m_variable + " environment variable";
        }

        return "Failed to access " + m_variable + " environment variable - " + base;
    }
1199418
protected SubscriptionMessage generateReplySubscriptionMessage()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "generateReplySubscriptionMessage");
      
    // Get the Message Handler for doing this operation.
    final SubscriptionMessageHandler messageHandler =
      iProxyHandler.getMessageHandler();
  
    // Reset the message.
    messageHandler.resetReplySubscriptionMessage();
      
    if (iLocalSubscriptions.size() > 0) 
    // Add the local subscriptions
      addToMessage(messageHandler, iLocalSubscriptions);
      
    if (iRemoteSubscriptions.size() > 0) 
      // Add the remote Subscriptions
      addToMessage(messageHandler, iRemoteSubscriptions);
        
    SubscriptionMessage message = messageHandler.getSubscriptionMessage();
   
    // Add the message back into the pool
    iProxyHandler.addMessageHandler(messageHandler);
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "generateReplySubscriptionMessage", message);
     
    return message;
  }
470709
public String buildMessagePayload(TestContext context, String messageType) {
        try {    
            //construct control message payload
            String messagePayload = "";
            if (scriptResourcePath != null) {
                messagePayload = buildMarkupBuilderScript(context.replaceDynamicContentInString(
                        FileUtils.readToString(FileUtils.getFileResource(scriptResourcePath, context), Charset.forName(context.resolveDynamicValue(scriptResourceCharset)))));
            } else if (scriptData != null) {
                messagePayload = buildMarkupBuilderScript(context.replaceDynamicContentInString(scriptData));
            }
            
            return messagePayload;
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to build control message payload", e);
        }
    }
121116
public Message createMessage(final String messageName) {
        final Message[] message = { null };
        for (final Object messageCreator : messageCreators) {
            ReflectionUtils.doWithMethods(messageCreator.getClass(), new ReflectionUtils.MethodCallback() {
                @Override
                public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
                    if (method.getAnnotation(MessageCreator.class).value().equals(messageName)) {
                        try {
                            message[0] = (Message) method.invoke(messageCreator);
                        } catch (InvocationTargetException e) {
                            throw new CitrusRuntimeException("Unsupported message creator method: " + method.getName(), e);
                        }
                    }
                }
            }, new ReflectionUtils.MethodFilter() {
                @Override
                public boolean matches(Method method) {
                    return method.getAnnotationsByType(MessageCreator.class).length > 0;
                }
            });
        }

        if (message[0] == null) {
            throw new CitrusRuntimeException("Unable to find message creator for message: " + messageName);
        }

        return message[0];
    }
1207206
public String getMessage() 
   {
      String msg = super.getMessage();
      String ec = getErrorCode();
      if ((msg == null) && (ec == null)) 
      {
         return null;
      }
      if ((msg != null) && (ec != null)) 
      {
         return (msg + ", error code: " + ec);
      }
      return ((msg != null) ? msg : ("error code: " + ec));
   }