public class NextCourierPatrolStation
extends ch.sahits.game.event.handler.ShipEntersPortEventListener
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.eventbus.AsyncEventBus |
clientEventBus |
private ch.sahits.game.openpatrician.model.Date |
date |
private org.joda.time.DateTime |
deadline |
private ch.sahits.game.openpatrician.util.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,
org.joda.time.DateTime deadline)
Create the next patrol station listener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute() |
void |
handleShipEntersPort(ch.sahits.game.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 org.joda.time.DateTime 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.util.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,
org.joda.time.DateTime deadline)
ship - city - state - player - deadline - @PostConstruct private void initializeEventBus()
@PreDestroy private void unregisterEventBus()
public void handleShipEntersPort(ch.sahits.game.event.data.ShipEntersPortEvent event)
handleShipEntersPort in class ch.sahits.game.event.handler.ShipEntersPortEventListenerpublic boolean execute()
execute in class ch.sahits.game.event.handler.ShipEntersPortEventListenerCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.