/** * Set the {@link MediaType media type} of the event data. * <p> * This information is mandatory. The default value is {@link MediaType#TEXT_PLAIN}. * </p> * * @param mediaType {@link MediaType} of event data. Must not be {@code null}. * @return updated builder instance. * @throws NullPointerException in case the {@code mediaType} parameter is {@code null}. */ public Builder mediaType(final MediaType mediaType) { if (mediaType == null) { throw new NullPointerException(LocalizationMessages.OUT_EVENT_MEDIA_TYPE_NULL()); } this.mediaType = mediaType; return this; }
/** * Set the {@link MediaType media type} of the event data. * <p> * This information is mandatory. The default value is {@link MediaType#TEXT_PLAIN}. * </p> * * @param mediaType {@link MediaType} of event data. Must not be {@code null}. * @return updated builder instance. * @throws NullPointerException in case the {@code mediaType} parameter is {@code null}. */ public Builder mediaType(final MediaType mediaType) { if (mediaType == null) { throw new NullPointerException(LocalizationMessages.OUT_EVENT_MEDIA_TYPE_NULL()); } this.mediaType = mediaType; return this; }
/** * Set the {@link MediaType media type} of the event data. * <p> * This information is mandatory. The default value is {@link MediaType#TEXT_PLAIN}. * </p> * * @param mediaType {@link MediaType} of event data. Must not be {@code null}. * @return updated builder instance. * @throws NullPointerException in case the {@code mediaType} parameter is {@code null}. */ public Builder mediaType(final MediaType mediaType) { if (mediaType == null) { throw new NullPointerException(LocalizationMessages.OUT_EVENT_MEDIA_TYPE_NULL()); } this.mediaType = mediaType; return this; }
/** * Set the {@link MediaType media type} of the event data. * <p> * This information is mandatory. The default value is {@link MediaType#TEXT_PLAIN}. * </p> * * @param mediaType {@link MediaType} of event data. Must not be {@code null}. * @return updated builder instance. * @throws NullPointerException in case the {@code mediaType} parameter is {@code null}. */ public Builder mediaType(final MediaType mediaType) { if (mediaType == null) { throw new NullPointerException(LocalizationMessages.OUT_EVENT_MEDIA_TYPE_NULL()); } this.mediaType = mediaType; return this; }