    001    package com.hammurapi.eventbus;
    002
    003    import com.hammurapi.eventbus.EventHandlerBase.Mode;
    004    import com.hammurapi.extract.Predicate;
    005
    006    public class EventDispatchJoinContextFilter<E, P extends Comparable<P>, C, H extends EventBus.Handle<E,P,C>, S extends EventStore<E,P,C,H,S>> implements EventDispatchJoinContext<E,P,C,H,S> {
    007
    008            protected EventDispatchContext<E,P,C,H,S> next;
    009
    010            public EventDispatchJoinContextFilter(EventDispatchContext<E,P,C,H,S> next) {
    011                    this.next = next;
    012            }
    013
    014            public void consume(int index) {
    015                    next.consume(index);
    016            }
    017
    018            public void consume(E event) {
    019                    next.consume(event);
    020            }
    021
    022    //      public <T extends E, S extends T> void substitute(T oldEvent, S newEvent) {
    023    //              next.substitute(oldEvent, newEvent);
    024    //      }
    025
    026            public void update(E event) {
    027                    next.update(event);
    028            }
    029
    030            public void removeHandler() {
    031                    next.removeHandler();
    032            }
    033
    034            @Override
    035            public void consumeJoin(int index) {
    036                    ((EventDispatchJoinContext<E,P,C,H,S>) next).consumeJoin(index);
    037            }
    038
    039            @Override
    040            public void consumeJoin(E event) {
    041                    ((EventDispatchJoinContext<E,P,C,H,S>) next).consumeJoin(event);
    042            }
    043
    044            @Override
    045            public S getEventStore() {
    046                    return next.getEventStore();
    047            }
    048
    049            @Override
    050            public void post(E event, Predicate<E, S>... validators) {
    051                    next.post(event, validators);
    052            }
    053
    054            @Override
    055            public Mode getMode() {
    056                    return next.getMode();
    057            }
    058
    059    }