public class NextCourierPatrolStation
extends ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.eventbus.AsyncEventBus |
clientEventBus |
private ch.sahits.game.openpatrician.clientserverinterface.service.ClientServerFactory |
clientServerFactory |
private ch.sahits.game.openpatrician.model.Date |
date |
private java.time.LocalDateTime |
deadline |
private ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateFactory |
dialogTemplateFactory |
private ch.sahits.game.openpatrician.utilities.l10n.Locale |
locale |
private org.springframework.context.MessageSource |
messageSource |
private ch.sahits.game.openpatrician.model.IPlayer |
player |
private Random |
rnd |
private CourierPatrolStateInternal |
state
Next station may be null if it is the last
|
private ClientTaskFactory |
taskFactory |
| Constructor and Description |
|---|
NextCourierPatrolStation(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
CourierPatrolStateInternal state,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline)
Create the next patrol station listener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(ch.sahits.game.openpatrician.model.city.ICity city) |
void |
handleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event) |
private void |
initializeEventBus() |
private void |
unregisterEventBus() |
private final CourierPatrolStateInternal state
private final ch.sahits.game.openpatrician.model.IPlayer player
private final java.time.LocalDateTime deadline
@Autowired private ch.sahits.game.openpatrician.model.Date date
@Autowired private ClientTaskFactory taskFactory
@Autowired private Random rnd
@Autowired @Qualifier(value="clientEventBus") private com.google.common.eventbus.AsyncEventBus clientEventBus
@Autowired private ch.sahits.game.openpatrician.clientserverinterface.service.ClientServerFactory clientServerFactory
@Autowired private ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateFactory dialogTemplateFactory
@Autowired private ch.sahits.game.openpatrician.utilities.l10n.Locale locale
@Autowired private org.springframework.context.MessageSource messageSource
public NextCourierPatrolStation(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
CourierPatrolStateInternal state,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline)
ship - city - state - player - deadline - @PostConstruct private void initializeEventBus()
@PreDestroy private void unregisterEventBus()
public void handleShipEntersPort(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
handleShipEntersPort in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListenerpublic boolean execute(ch.sahits.game.openpatrician.model.city.ICity city)
execute in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListenerCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.