    001    package com.hammurapi.eventbus;
    002
    003    import java.util.Set;
    004
    005    /**
    006     * Interface for binding Java classes with annotated methods to event bus.
    007     * @author Pavel Vlasov
    008     *
    009     * @param <C> Context type.
    010     * @param <K> Registration key type.
    011     */
    012    public interface JavaBinder<E, C, K, H extends EventBus.Handle<E,Integer,C>, S extends EventStore<E,Integer,C,H,S>, B extends EventBus<E, Integer, C, K, H, S>, I extends C> {
    013
    014            /**
    015             * Binds instance to the bus
    016             * @param instance
    017             * @param bus
    018             * @return Registration keys.
    019             */
    020            Set<K> bind(I instance, B bus);
    021    }