Class OpponentsOrder
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.event.TimedTask
-
- ch.sahits.game.openpatrician.display.event.task.OpponentsOrder
-
- All Implemented Interfaces:
java.lang.Runnable
public class OpponentsOrder extends TimedTask
Order of the opponent to attack the original client. The offer is postponed 10 days and will be canceled once the opponents ship is attacked. This task adds itself the the timed event list.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Feb 24, 2013
-
-
Field Summary
Fields Modifier and Type Field Description private IPlayer
client
private com.google.common.eventbus.AsyncEventBus
clientEventBus
private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private Date
date
private EventHandlerFactory
eventHandlerFactory
private TimedUpdatableTaskList
list
private Locale
locale
private org.springframework.context.MessageSource
messageSource
private IPlayer
opponent
private TimedEventListener
order
private IPlayer
player
private int
premium
-
Constructor Summary
Constructors Constructor Description OpponentsOrder(IPlayer opponent, IPlayer client, IPlayer player, int premium)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleShipAttack(ShipAttackEvent event)
Handling ships attacks.private void
initializeEventBus()
void
run()
java.lang.String
toString()
-
-
-
Field Detail
-
opponent
private final IPlayer opponent
-
client
private final IPlayer client
-
player
private final IPlayer player
-
premium
private final int premium
-
list
@Autowired private TimedUpdatableTaskList list
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
clientEventBus
@Autowired @Qualifier("clientEventBus") private com.google.common.eventbus.AsyncEventBus clientEventBus
-
eventHandlerFactory
@Autowired private EventHandlerFactory eventHandlerFactory
-
date
@Autowired private Date date
-
locale
@Autowired private Locale locale
-
messageSource
@Autowired @Qualifier("messageSource") private org.springframework.context.MessageSource messageSource
-
order
private TimedEventListener order
-
-
Method Detail
-
initializeEventBus
@PostConstruct private void initializeEventBus()
-
run
public void run()
-
handleShipAttack
public void handleShipAttack(ShipAttackEvent event)
Handling ships attacks.- Parameters:
event
- of a ship attack
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-