@Override public SubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given filter. If an {@code update} is {@code * null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param filter predicate on subscription query message used to filter subscription queries * @param update incremental update * @param <U> the type of the update */ default <U> void emit(Predicate<SubscriptionQueryMessage<?, ?, U>> filter, U update) { if (update != null) { emit(filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }
/** * Creates {@link GenericSubscriptionQueryUpdateMessage} from provided {@code payload} which represents incremental * update. The provided {@code payload} may not be {@code null}. * * @param payload incremental update * @param <T> type of the {@link GenericSubscriptionQueryUpdateMessage} * @return created a {@link SubscriptionQueryUpdateMessage} with the given {@code payload}. */ @SuppressWarnings("unchecked") public static <T> SubscriptionQueryUpdateMessage<T> asUpdateMessage(Object payload) { if (SubscriptionQueryUpdateMessage.class.isInstance(payload)) { return (SubscriptionQueryUpdateMessage<T>) payload; } else if (payload instanceof Message) { return new GenericSubscriptionQueryUpdateMessage<>((Message) payload); } return new GenericSubscriptionQueryUpdateMessage<>((T) payload); }
/** * Creates {@link GenericSubscriptionQueryUpdateMessage} from provided {@code payload} which represents incremental * update. The provided {@code payload} may not be {@code null}. * * @param payload incremental update * @param <T> type of the {@link GenericSubscriptionQueryUpdateMessage} * @return created a {@link SubscriptionQueryUpdateMessage} with the given {@code payload}. */ @SuppressWarnings("unchecked") public static <T> SubscriptionQueryUpdateMessage<T> asUpdateMessage(Object payload) { if (SubscriptionQueryUpdateMessage.class.isInstance(payload)) { return (SubscriptionQueryUpdateMessage<T>) payload; } else if (payload instanceof Message) { return new GenericSubscriptionQueryUpdateMessage<>((Message) payload); } return new GenericSubscriptionQueryUpdateMessage<>((T) payload); }
@Override public SubscriptionQueryUpdateMessage<U> andMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().andMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given query type and filter. If an {@code update} * is {@code null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param queryType the type of the query * @param filter predicate on query payload used to filter subscription queries * @param update incremental update * @param <Q> the type of the query * @param <U> the type of the update */ default <Q, U> void emit(Class<Q> queryType, Predicate<? super Q> filter, U update) { if (update != null) { emit(queryType, filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }
/** * Creates {@link GenericSubscriptionQueryUpdateMessage} from provided {@code payload} which represents incremental * update. The provided {@code payload} may not be {@code null}. * * @param payload incremental update * @param <T> type of the {@link GenericSubscriptionQueryUpdateMessage} * @return created a {@link SubscriptionQueryUpdateMessage} with the given {@code payload}. */ @SuppressWarnings("unchecked") public static <T> SubscriptionQueryUpdateMessage<T> asUpdateMessage(Object payload) { if (SubscriptionQueryUpdateMessage.class.isInstance(payload)) { return (SubscriptionQueryUpdateMessage<T>) payload; } else if (payload instanceof Message) { return new GenericSubscriptionQueryUpdateMessage<>((Message) payload); } return new GenericSubscriptionQueryUpdateMessage<>((T) payload); }
@Override public SubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given filter. If an {@code update} is {@code * null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param filter predicate on subscription query message used to filter subscription queries * @param update incremental update * @param <U> the type of the update */ default <U> void emit(Predicate<SubscriptionQueryMessage<?, ?, U>> filter, U update) { if (update != null) { emit(filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }
@Override public SubscriptionQueryUpdateMessage<U> withMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().withMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given filter. If an {@code update} is {@code * null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param filter predicate on subscription query message used to filter subscription queries * @param update incremental update * @param <U> the type of the update */ default <U> void emit(Predicate<SubscriptionQueryMessage<?, ?, U>> filter, U update) { if (update != null) { emit(filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }
@Override public SubscriptionQueryUpdateMessage<U> andMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().andMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given query type and filter. If an {@code update} * is {@code null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param queryType the type of the query * @param filter predicate on query payload used to filter subscription queries * @param update incremental update * @param <Q> the type of the query * @param <U> the type of the update */ default <Q, U> void emit(Class<Q> queryType, Predicate<? super Q> filter, U update) { if (update != null) { emit(queryType, filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }
@Override public SubscriptionQueryUpdateMessage<U> andMetaData(Map<String, ?> metaData) { return new GenericSubscriptionQueryUpdateMessage<>(getDelegate().andMetaData(metaData)); }
/** * Emits given incremental update to subscription queries matching given query type and filter. If an {@code update} * is {@code null}, emit will be skipped. In order to send nullable updates, use {@link #emit(Class, Predicate, * SubscriptionQueryUpdateMessage)} or {@link #emit(Predicate, SubscriptionQueryUpdateMessage)} methods. * * @param queryType the type of the query * @param filter predicate on query payload used to filter subscription queries * @param update incremental update * @param <Q> the type of the query * @param <U> the type of the update */ default <Q, U> void emit(Class<Q> queryType, Predicate<? super Q> filter, U update) { if (update != null) { emit(queryType, filter, GenericSubscriptionQueryUpdateMessage.asUpdateMessage(update)); } }