+ /**
+ * Remove the given subscriber from the list
+ * @param inSub subscriber to remove
+ */
+ public static void removeSubscriber(DataSubscriber inSub)
+ {
+ for (int i=0; i<MAXIMUM_NUMBER_SUBSCRIBERS; i++)
+ {
+ if (_subscribers[i] == inSub)
+ {
+ _subscribers[i] = null;
+ // Could break out of the loop here but we want to make sure we remove all of them
+ }
+ }
+ _searchStartIndex = 0; // for the next add, start from beginning to ensure all gaps are filled
+ }
+
+ /**
+ * Enable or disable the messaging (to allow temporary disabling for multiple operations)
+ * @param inEnabled false to disable, true to enable again
+ */
+ public static void enableMessaging(boolean inEnabled)
+ {
+ _enabled = inEnabled;
+ }