/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.fabric;

/**
 * Classes implementing <code>SubscriptionBase</code> store a series of subscriptions to a given series of
 * keys (symbols).
 *
 * @author Alex Leigh
 */
public interface SubscriptionBase<E> {
    void subscribe(MessageSubscription<E> subscription);

    /**
     * Remove a subscription from this fabric.
     *
     * @param subscription
     */
    void unsubscribe(MessageSubscription<E> subscription);

    Iterable<MessageSubscription<E>> matching(String symbol);
}
