/*
 * 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;

public interface MessageFabric<E> {
    /**
     * Send the given message to the given symbol. The transmission mechanics (async / sync, error consuming, etc)
     * will depend on the individual fabric implementation.
     *
     * @param symbol
     * @param msg
     */
    void send(String symbol, E msg) throws Throwable;

    /**
     * Returns the <code>SubscriptionBase</code> associated with this fabric.
     *
     * @return
     */
    SubscriptionBase<E> getSubscriptionBase();
}