Class 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 Detail

      • opponent

        private final IPlayer opponent
      • client

        private final IPlayer client
      • player

        private final IPlayer player
      • premium

        private final int premium
      • clientServerEventBus

        @Autowired
        @Qualifier("serverClientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientServerEventBus
      • clientEventBus

        @Autowired
        @Qualifier("clientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientEventBus
      • date

        @Autowired
        private Date date
      • locale

        @Autowired
        private Locale locale
      • messageSource

        @Autowired
        @Qualifier("messageSource")
        private org.springframework.context.MessageSource messageSource
    • Constructor Detail

      • OpponentsOrder

        public OpponentsOrder​(IPlayer opponent,
                              IPlayer client,
                              IPlayer player,
                              int premium)
    • 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 class java.lang.Object