Class SinkConcurrentsShipOrder


  • public class SinkConcurrentsShipOrder
    extends TimedEventListener
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Feb 22, 2014
    • 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
    • Constructor Detail

      • SinkConcurrentsShipOrder

        public SinkConcurrentsShipOrder​(IPlayer opponent,
                                        IPlayer player,
                                        int offerdTime,
                                        int premium,
                                        TimedTask reconciliation)
    • 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 class TimedEventListener
        Returns:
        true if the event was handled and the listener can be removed.