Class SinkConcurrentsShipOrder
- java.lang.Object
-
- ch.sahits.game.openpatrician.event.handler.TimedEventListener
-
- ch.sahits.game.openpatrician.display.event.handler.impl.SinkConcurrentsShipOrder
-
public class SinkConcurrentsShipOrder extends TimedEventListener
- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Feb 22, 2014
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.eventbus.AsyncEventBus
clientEventBus
private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private TimedUpdatableTaskList
list
private Locale
locale
private org.springframework.context.MessageSource
messageSource
private int
offeredTime
private IPlayer
opponent
private IPlayer
player
private int
premium
private TimedTask
reconciliation
-
Fields inherited from class ch.sahits.game.openpatrician.event.handler.TimedEventListener
date, deadline
-
-
Constructor Summary
Constructors Constructor Description SinkConcurrentsShipOrder(IPlayer opponent, IPlayer player, int offerdTime, int premium, TimedTask reconciliation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
Method that is executed if an appropriate event arrives within the timeline.void
handleShipAttack(ShipAttackEvent event)
Handle the ships attakprivate void
initialize()
private void
unregisterEventBus()
-
Methods inherited from class ch.sahits.game.openpatrician.event.handler.TimedEventListener
destroy, setDeadline
-
-
-
-
Field Detail
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
clientEventBus
@Autowired @Qualifier("clientEventBus") private com.google.common.eventbus.AsyncEventBus clientEventBus
-
locale
@Autowired private Locale locale
-
messageSource
@Autowired private org.springframework.context.MessageSource messageSource
-
opponent
private final IPlayer opponent
-
player
private final IPlayer player
-
premium
private final int premium
-
reconciliation
private final TimedTask reconciliation
-
offeredTime
private final int offeredTime
-
list
@Autowired private TimedUpdatableTaskList list
-
-
Method Detail
-
initialize
@PostConstruct private void initialize()
-
unregisterEventBus
@PreDestroy private void unregisterEventBus()
-
handleShipAttack
public void handleShipAttack(ShipAttackEvent event)
Handle the ships attak- Parameters:
event
- ship attack event
-
execute
public boolean execute()
Description copied from class:TimedEventListener
Method that is executed if an appropriate event arrives within the timeline.- Specified by:
execute
in classTimedEventListener
- Returns:
- true if the event was handled and the listener can be removed.
-
-