/** * Returns a new instance of {@code MessageHeadersBuilder} initialized with the the properties of the given {@code * jsonObject}. * * @param jsonObject the JSON object which provides the initial properties of the builder. * @return a builder for creating {@code MessageHeaders} object. * @throws NullPointerException if {@code jsonObject} is {@code null}. * @throws IllegalArgumentException if {@code jsonObject} contains a value that did not represent its appropriate * Java type or if {@code jsonObject} did lack a mandatory header. * @throws SubjectInvalidException if {@code jsonObject} contains an invalid value for * {@link MessageHeaderDefinition#SUBJECT}. */ public static MessageHeadersBuilder of(final JsonObject jsonObject) { return of(toMap(jsonObject)); }