Returns the message. If the performance data has been passed in, they are
attached at the end of the message accordingly to the Nagios
specifications


@return The message and optionally the performance data
514788
public String getMessage() {
        if (performanceDataList.isEmpty()) {
            return messageString;
        }
        StringBuilder res = new StringBuilder(messageString).append('|');
        for (PerformanceData pd : performanceDataList) {
            res.append(pd.toPerformanceString()).append(' ');
        }
        return res.toString();
    }
111090
public int getInMemoryDataSize()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getInMemoryDataSize");
        int dataSize;

        // If tuning has requested return the size of the message we reference,
        // then delegate to the message. Otherwise call our parent to get a
        // (small) default size.
        if (_sizeRefsByMsgSize)
        {
            try
            {
                dataSize = getReferredItem().getInMemoryDataSize();
            }
            catch (SevereMessageStoreException e)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(e,"com.ibm.ws.sib.msgstore.ItemReference.getInMemoryDataSize","244",this);
                // After FFDCing anything nasty, fall back to the standard answer
                dataSize = super.getInMemoryDataSize();
            }
        }
        else
        {
            dataSize = super.getInMemoryDataSize();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getInMemoryDataSize",  dataSize);
        return dataSize;
    }
656119
public AisMessage getMessage() {
		AisMessage m = aisParser.parse(aisMessage, nmea.getSource(), padBits);
		return m;
	}
1089555
@Override
    public String getMessage()
    {
        String locMsg = getLocationDesc();
        /* Better not use super's message if we do have location information,
         * since parent's message contains (part of) Location
         * info; something we can regenerate better...
         */
        if (locMsg == null) {
            return super.getMessage();
        }
        StringBuilder sb = new StringBuilder(mMsg.length() + locMsg.length() + 20);
        sb.append(mMsg);
        StringUtil.appendLF(sb);
        sb.append(" at ");
        sb.append(locMsg);
        return sb.toString();
    }
93741
@Override public String getMessage() {
    String gaiName = OsConstants.gaiName(error);
    if (gaiName == null) {
      gaiName = "GAI_ error " + error;
    }
    String description = NetworkOs.gai_strerror(error);
    return functionName + " failed: " + gaiName + " (" + description + ")";
  }
354932
public String getDefaultMessage() {
    String defaultMessage = getFieldValue(DEFAULT_MESSAGE_KEY);
    if (defaultMessage == null) {
      defaultMessage = this.toString();
    }
    return defaultMessage;
  }
38305
private String getGatewayMessage(final List<Result> results) throws IOException {
		int valueCount = 0;
		Writer writer = new StringWriter();
		JsonGenerator g = jsonFactory.createGenerator(writer);
		g.writeStartObject();
		g.writeNumberField("timestamp", System.currentTimeMillis() / 1000);
		g.writeNumberField("proto_version", STACKDRIVER_PROTOCOL_VERSION);
		g.writeArrayFieldStart("data");

		List<String> typeNames = this.getTypeNames();

		for (Result metric : results) {
			if (isNumeric(metric.getValue())) {
				// we have a numeric value, write a value into the message

				StringBuilder nameBuilder = new StringBuilder();

				// put the prefix if set
				if (this.prefix != null) {
					nameBuilder.append(prefix);
					nameBuilder.append(".");
				}

				// put the class name or its alias if available
				if (!metric.getKeyAlias().isEmpty()) {
					nameBuilder.append(metric.getKeyAlias());

				} else {
					nameBuilder.append(metric.getClassName());
				}

				// Wildcard "typeNames" substitution
				String typeName = com.googlecode.jmxtrans.model.naming.StringUtils.cleanupStr(
						TypeNameValuesStringBuilder.getDefaultBuilder().build(typeNames, metric.getTypeName()));
				if (typeName != null && typeName.length() > 0) {
					nameBuilder.append(".");
					nameBuilder.append(typeName);
				}

				// add the attribute name
				nameBuilder.append(".");
				nameBuilder.append(KeyUtils.getValueKey(metric));

				// check for Float/Double NaN since these will cause the message validation to fail
				if (metric.getValue() instanceof Float && ((Float) metric.getValue()).isNaN()) {
					logger.info("Metric value for " + nameBuilder.toString() + " is NaN, skipping");
					continue;
				}

				if (metric.getValue() instanceof Double && ((Double) metric.getValue()).isNaN()) {
					logger.info("Metric value for " + nameBuilder.toString() + " is NaN, skipping");
					continue;
				}

				valueCount++;
				g.writeStartObject();

				g.writeStringField("name", nameBuilder.toString());

				g.writeNumberField("value", Double.valueOf(metric.getValue().toString()));

				// if the metric is attached to an instance, include that in the message
				if (instanceId != null && !instanceId.isEmpty()) {
					g.writeStringField("instance", instanceId);
				}
				g.writeNumberField("collected_at", metric.getEpoch() / 1000);
				g.writeEndObject();
			}
		}

		g.writeEndArray();
		g.writeEndObject();
		g.flush();
		g.close();

		// return the message if there are any values to report
		if (valueCount > 0) {
			return writer.toString();
		} else {
			return null;
		}
	}
836020
private WMessages getWMessageInstance() {
		MessageContainer container = getMessageContainer(component);
		WMessages result = null;

		if (container == null) {
			LOG.warn("No MessageContainer as ancestor of " + component
					+ ". Messages will not be added");
		} else {
			result = container.getMessages();

			if (result == null) {
				LOG.warn("No messages in container of " + component
						+ ". Messages will not be added");
			}
		}

		return result;
	}
1231572
public MessageInfo getMessageInfo() {
        if (messageInfo == null) {
            MessageLine l = firstLine.prev;
            if (l != null && l.isInfo())
                messageInfo = new MessageInfo(l.text);
            else
                messageInfo = MessageInfo.dummyInfo;
        }
        return messageInfo;
    }
521772
public SIMPMessage getMessageLocked() throws MessageStoreException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMessageLocked");
    
    SIMPMessage msg = null;
    
    if(classifyingMessages)
    {
      // Take the classifications read lock
      consumerSet.takeClassificationReadLock();

      // Classifications may change dynamically, so check the pendingReset
      // flag under this lock. If classifications have changed then we'll
      // set up the filters again
      if(pendingFlowReset)
      {
        pendingFlowReset = false;
        resetFlowProperties();
      }
        
      // Determine which cursor to use. chooseGetCursorIndex() will 
      // randomly choose an index if XD has specified weightings.
      // The method can be called more than once. This supports the situation
      // where we've looked for but not found any messages of a particular 
      // classification. 
      // 
      // If chooseGetCursorIndex() returns 0, then either no classifications were 
      // specified or we've already tried all the classifications. An index
      // of 0 leads to the use of the default (unclassified) cursor.
      int classIndex = -1;
      while(classIndex != 0)
      {
        classIndex = chooseGetCursorIndex(classIndex);
     
        // Always use the cursor straight from the key
        msg = getMessageLocked(classIndex);

        if(msg != null)
          classIndex = 0;
      }

      // Free the classifications read lock
      consumerSet.freeClassificationReadLock();
    }
    else // Not classifying
    {
      // Use the zeroth index
      msg = getMessageLocked(0);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getMessageLocked", msg);

    return msg;
  }
90354
public short getLowestMessagePriority()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getLowestMessagePriority");

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Joined resource:", joinedResource);

      final short result;
      if (joinedResource != null)
      {
         result = joinedResource.getLowestMessagePriority();
      }
      else
      {
         result = super.getLowestMessagePriority();
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getLowestMessagePriority", result);
      return result;
   }
465684
public Object get()
    {
        Object data = null;
        if (this.getMessage() != null)
            data = this.getMessage().getNative(this.getFullKey(null));
        try {
            data = DataConverters.convertObjectToDatatype(data, this.getRawClassType(), this.getDefault());
        } catch (Exception ex) {
            data = null;
        }
        return data;
    }
511185
public String getMessage() {
        String message = super.getMessage();
        if (m_iErrorCode != -1)
            message = message + " Error code: " + m_iErrorCode;
        return message;
    }
823172
public int getMessageLength() {
    // Message type, number of transients
    int length = 1 + 4;
    if (this.transientRequests != null) {
      for (OnDemandRequest request : this.transientRequests) {
        length += request.getLength();
      }
    }

    return length;
  }
503601
private String getAuthMessage() {
        if (clientFirstMessageBare == null) {
            throw new RuntimeException("can't call getAuthMessage without clientFirstMessageBare is set");
        }
        if (serverFirstMessage == null) {
            throw new RuntimeException("can't call getAuthMessage without serverFirstMessage is set");
        }
        if (clientFinalMessageNoProof == null) {
            throw new RuntimeException("can't call getAuthMessage without clientFinalMessageNoProof is set");
        }
        return clientFirstMessageBare + "," + serverFirstMessage + "," + clientFinalMessageNoProof;
    }
387781
public int getMessageLength() {
    // Message type, number of type specifications
    int length = 1 + 4;

    if (this.attributeSpecifications != null) {
      for (AttributeSpecification spec : this.attributeSpecifications) {
        // alias, Name length, transient byte
        length += (4 + 4 + 1);
        if (spec.getAttributeName() != null) {
          try {
            length += spec.getAttributeName().getBytes("UTF-16BE").length;
          } catch (UnsupportedEncodingException e) {
            log.error("Unable to encode UTF-16BE strings.");
          }
        }
      }
    }

    if (this.origin != null) {
      try {
        length += this.origin.getBytes("UTF-16BE").length;
      } catch (UnsupportedEncodingException e) {
        log.error("Unable to encode UTF-16 strings.");
        e.printStackTrace();
      }
    }

    return length;
  }
179671
public int getMessageLength(){
		// Message type, number of transients
		int length = 1 + 4;
		if(this.requests != null){
			for(OnDemandRequest request : this.requests){
				length += request.getLength();
			}
		}
		
		return length;
	}