EventFieldFilter

public final class EventFieldFilter implements EventFilter

An EventFilter which allows all the events but trims some of their message fields.

By default, the input event is returned unchanged. Specify a FieldMask for an event type to trim certain fields off the event messages. The fields in the mask are retained, all the others are cleared.

Note that the mask should contain all the (required) = true fields. Otherwise, the event will not be acknowledged by the bus.

Types

Link copied to clipboard
public final class Builder
A builder for the EventFieldFilter instances.

Functions

Link copied to clipboard
public Optional<? extends EventMessage> filter(EventMessage event)
Applies this filter to the given event.
public ImmutableCollection<Event> filter(Collection<Event> events)
Applies this filter to the given Events in bulk.
Link copied to clipboard
Creates a new instance of Builder for EventFieldFilter instances.

Inherited functions

Link copied to clipboard
public static EventFilter allowAll()
Obtains an EventFilter which always returns the input event without any change.