X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2FUpdateMessageBroker.java;h=cac2a79dddc08e5a5d68ccc6f3dcca934c73a930;hb=5625a1abadb5f2ca5f017fe7dbda1d5141cb637b;hp=f2dfd2aaeb2ca1a072a37ac21d36a32874d1bbdd;hpb=312fec956e43f5d0a38617da5d0add9c62563e2c;p=GpsPrune.git diff --git a/tim/prune/UpdateMessageBroker.java b/tim/prune/UpdateMessageBroker.java index f2dfd2a..cac2a79 100644 --- a/tim/prune/UpdateMessageBroker.java +++ b/tim/prune/UpdateMessageBroker.java @@ -8,7 +8,7 @@ public class UpdateMessageBroker { private DataSubscriber[] _subscribers; private int _subscriberNum = 0; - private static final int MAXIMUM_NUMBER_SUBSCRIBERS = 4; + private static final int MAXIMUM_NUMBER_SUBSCRIBERS = 5; /** @@ -37,12 +37,22 @@ public class UpdateMessageBroker * the data has been updated */ public void informSubscribers() + { + informSubscribers(DataSubscriber.ALL); + } + + + /** + * Send message to all subscribers + * @param inChange Change that occurred + */ + public void informSubscribers(byte inChange) { for (int i=0; i<_subscribers.length; i++) { if (_subscribers[i] != null) { - _subscribers[i].dataUpdated(); + _subscribers[i].dataUpdated(inChange); } } }