/** * Returns a new builder for {@link MessageHeaders}. * * @param direction the direction of the message. * @param thingId the thing ID of the message. * @param subject the subject of the message. * @return the builder. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code thingId} or {@code subject} is empty. * @throws SubjectInvalidException if {@code subject} is invalid. */ public static MessageHeadersBuilder newHeadersBuilder(final MessageDirection direction, final CharSequence thingId, final CharSequence subject) { return MessageHeadersBuilder.newInstance(direction, thingId, subject); }