Пример #1
0
 void safeProcessUpdate(ObservationListener listener, Date date, double value)
 {
     try {
         listener.onUpdate(date, value);
     } catch (Exception e) {
         LogC.err(symbol.name + " failed processing observation " + ymdHuman(date) + ": " + value, e);
     }
 }
Пример #2
0
 public void add(ObservationListener listener)
 {
     listeners.Add(listener);
     if (lastDate != null)
     {
         safeProcessUpdate(listener, lastDate, lastValue);
     }
 }
Пример #3
0
 public void subscribe(Symbol symbol, ObservationListener listener)
 {
     observationListeners.get(symbol).add(listener);
 }