public class IndividualPeriodicalUpdater extends Object implements IIndividualPeriodicalUpdater
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
IndividualPeriodicalUpdater.UpdateableObject |
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ch.sahits.game.openpatrician.model.Date |
date |
private Map<IndividualPeriodicalUpdater.UpdateableObject,org.joda.time.DateTime> |
registeredUpdatableObjects
Map storing the registered objects together with their next updatable time.
|
private com.google.common.eventbus.AsyncEventBus |
timerEventBus |
| Constructor and Description |
|---|
IndividualPeriodicalUpdater() |
| Modifier and Type | Method and Description |
|---|---|
(package private) Map<IndividualPeriodicalUpdater.UpdateableObject,org.joda.time.DateTime> |
getRegisteredUpdatableObjects() |
void |
handleClockTick(ClockTick event)
Method handling the external events of a clock tick.
|
private void |
register() |
void |
register(Object addresse,
Object target)
Register a new object with the daily updater.
|
private void |
unregister() |
void |
unregister(Object target)
Unregister a target from further notifications.
|
@Autowired private ch.sahits.game.openpatrician.model.Date date
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired @Qualifier(value="timerEventBus") private com.google.common.eventbus.AsyncEventBus timerEventBus
private Map<IndividualPeriodicalUpdater.UpdateableObject,org.joda.time.DateTime> registeredUpdatableObjects
@PostConstruct private void register()
@PreDestroy private void unregister()
public void register(Object addresse, Object target)
IIndividualPeriodicalUpdaterregister in interface IIndividualPeriodicalUpdateraddresse - the object which handels the updates.target - which registers an updaterpublic void unregister(Object target)
IIndividualPeriodicalUpdaterunregister in interface IIndividualPeriodicalUpdatertarget - to be unregistered.public void handleClockTick(ClockTick event)
IIndividualPeriodicalUpdaterhandleClockTick in interface IIndividualPeriodicalUpdaterevent - object.Map<IndividualPeriodicalUpdater.UpdateableObject,org.joda.time.DateTime> getRegisteredUpdatableObjects()
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.