public static void start() { if (sTimer == null) { sTimer = new TimerHandler(getInstance()); sTimer.setName("Updates"); sTimer.start(); } JConfig.registerListener(getInstance()); }
/** The publishing timer has elapsed. */ synchronized void onPublishingTimer() { State state = this.state.get(); logger.trace( "[id={}] onPublishingTimer(), state={}, keep-alive={}, lifetime={}", subscriptionId, state, keepAliveCounter, lifetimeCounter); if (state == State.Normal) timerHandler.whenNormal(); else if (state == State.KeepAlive) timerHandler.whenKeepAlive(); else if (state == State.Late) timerHandler.whenLate(); else if (state == State.Closed) logger.debug("[id={}] onPublish(), state={}", subscriptionId, state); // No-op. else throw new RuntimeException("unhandled subscription state: " + state); }