/** * Construct a message with no body and empty headers. This method is * primarily used by serialization. */ public HazelcastMQMessage() { this(new DefaultHeaders(), null); }
@Override public Collection<String> getHeaderNames() { return keySet(); }
/** * Returns the headers of the message. * * @return the headers the headers of the message */ public Headers getHeaders() { if (headers == null) { headers = new DefaultHeaders(); } return headers; }