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.AsyncEventBusclientEventBusprivate com.google.common.eventbus.AsyncEventBusclientServerEventBusprivate TimedUpdatableTaskListlistprivate Localelocaleprivate org.springframework.context.MessageSourcemessageSourceprivate intofferedTimeprivate IPlayeropponentprivate IPlayerplayerprivate intpremiumprivate TimedTaskreconciliation-
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 booleanexecute()Method that is executed if an appropriate event arrives within the timeline.voidhandleShipAttack(ShipAttackEvent event)Handle the ships attakprivate voidinitialize()private voidunregisterEventBus()-
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:TimedEventListenerMethod that is executed if an appropriate event arrives within the timeline.- Specified by:
executein classTimedEventListener- Returns:
- true if the event was handled and the listener can be removed.
-
-