Search in sources :

Example 1 with EventFilter

use of io.spine.server.event.EventFilter in project core-java by SpineEventEngine.

the class ProjectionRepository method getEventFilters.

/**
     * Obtains event filters for event classes handled by projections of this repository.
     */
private Set<EventFilter> getEventFilters() {
    final ImmutableSet.Builder<EventFilter> builder = ImmutableSet.builder();
    final Set<EventClass> eventClasses = getMessageClasses();
    for (EventClass eventClass : eventClasses) {
        final String typeName = TypeName.of(eventClass.value()).value();
        builder.add(EventFilter.newBuilder().setEventType(typeName).build());
    }
    return builder.build();
}
Also used : EventClass(io.spine.type.EventClass) ImmutableSet(com.google.common.collect.ImmutableSet) EventFilter(io.spine.server.event.EventFilter)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 EventFilter (io.spine.server.event.EventFilter)1 EventClass (io.spine.type.EventClass)1