public class LoanerEngine extends AbstractEngine
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ch.sahits.game.openpatrician.model.Date |
date |
private StateFactory |
factory |
private ch.sahits.game.openpatrician.model.city.LoanerList |
loaners |
private ch.sahits.game.openpatrician.util.l10n.Locale |
locale |
private org.springframework.context.MessageSource |
messageSource |
private Random |
rnd |
private StateFactory |
stateFactory |
| Constructor and Description |
|---|
LoanerEngine() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addNewLoaner(ch.sahits.game.openpatrician.model.city.ICity city) |
(package private) Runnable |
createPawnRunnable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt) |
(package private) Runnable |
createRemitRunnable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt) |
List<ch.sahits.game.openpatrician.model.city.impl.IDebt> |
findDebts(ch.sahits.game.openpatrician.model.city.ILoaner loaner,
ch.sahits.game.openpatrician.model.IPlayer player)
Find all the debt of a player with a given loaner.
|
List<ch.sahits.game.openpatrician.model.city.impl.IDebt> |
findLoans(ch.sahits.game.openpatrician.model.city.ILoaner loaner,
ch.sahits.game.openpatrician.model.IPlayer creditor)
Find all the debts that were granted by a player.
|
List<AbstractEngine> |
getChildren()
Any engine may hold various child engines.
|
void |
handleDailyUpdate(PeriodicalDailyUpdate event) |
void |
handleWeeklyUpdate(PeriodicalTimeWeekUpdate event) |
private void |
init() |
(package private) void |
postMessageDebtNotFulfillable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt) |
private void |
unregister() |
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired private StateFactory factory
@Autowired private ch.sahits.game.openpatrician.model.Date date
@Autowired private Random rnd
@Autowired private ch.sahits.game.openpatrician.util.l10n.Locale locale
@Autowired private org.springframework.context.MessageSource messageSource
@Autowired private ch.sahits.game.openpatrician.model.city.LoanerList loaners
@Autowired private StateFactory stateFactory
@PostConstruct private void init()
@PreDestroy private void unregister()
public void handleWeeklyUpdate(PeriodicalTimeWeekUpdate event)
public void handleDailyUpdate(PeriodicalDailyUpdate event)
void postMessageDebtNotFulfillable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt)
Runnable createRemitRunnable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt)
Runnable createPawnRunnable(ch.sahits.game.openpatrician.model.city.impl.IDebt debt)
void addNewLoaner(ch.sahits.game.openpatrician.model.city.ICity city)
public List<AbstractEngine> getChildren()
AbstractEnginegetChildren in class AbstractEnginepublic List<ch.sahits.game.openpatrician.model.city.impl.IDebt> findDebts(ch.sahits.game.openpatrician.model.city.ILoaner loaner, ch.sahits.game.openpatrician.model.IPlayer player)
loaner - player - public List<ch.sahits.game.openpatrician.model.city.impl.IDebt> findLoans(ch.sahits.game.openpatrician.model.city.ILoaner loaner, ch.sahits.game.openpatrician.model.IPlayer creditor)
loaner - creditor - Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.