package tim.prune; /** * Class responsible for distributing update information * to all registered listeners */ public abstract class UpdateMessageBroker { private static final int MAXIMUM_NUMBER_SUBSCRIBERS = 8; /** Array of all subscribers */ private static DataSubscriber[] _subscribers = new DataSubscriber[MAXIMUM_NUMBER_SUBSCRIBERS]; /** Index from which to start looking for an empty slot*/ private static int _searchStartIndex = 0; /** Enable/disabled flag */ private static boolean _enabled = true; /** * Add a data subscriber to the list * @param inSub DataSubscriber to add */ public static void addSubscriber(DataSubscriber inSub) { // Loop looking for first null entry for (int i=_searchStartIndex; i