public void start() { log.infof("Starting HeartbeatEmitter. Observe the HeartbeatEvent to subscribe.", Instant.now()); final Runnable emitter = new Runnable() { @Override public void run() { try { log.debugf("heartbeat: %s", Instant.now()); heartbeat.fire(new HeartbeatEvent()); } catch (Exception e) { log.error(e); } } }; emitterHandle = scheduler.scheduleAtFixedRate(emitter, initialDelay, periodInSeconds, TimeUnit.SECONDS); }
@Override public final void hotelSelected( final String customerName, final String hotelName, final String city) { log.infof(hotelSelected$str(), customerName, hotelName, city); }
@Override public final void bookingConfirmed(final String hotelName, final String customerName) { log.infof(bookingConfirmed$str(), hotelName, customerName); }
@Override public final void hotelEntityInPersistenceContext(final boolean state) { log.infof(hotelEntityInPersistenceContext$str(), state); }
@Override public final void bookingInitiated(final String customerName, final String hotelName) { log.infof(bookingInitiated$str(), customerName, hotelName); }