Class AuctionEngine
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.AbstractEngine
-
- ch.sahits.game.openpatrician.engine.land.city.internal.AuctionEngine
-
public class AuctionEngine extends AbstractEngine
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Nov 07, 2016
-
-
Field Summary
Fields Modifier and Type Field Description static int
BID_DELTA
private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private EngineFactory
factory
private java.util.concurrent.ScheduledExecutorService
timer
-
Constructor Summary
Constructors Constructor Description AuctionEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AbstractEngine>
getChildren()
Any engine may hold various child engines.void
handleBid(AuctionBid bid)
void
handleBidLevelChange(AuctionBidLevel change)
private void
init()
void
startAuction(IAuction auction, java.util.List<IAIPlayer> players)
private void
unregister()
-
-
-
Field Detail
-
BID_DELTA
public static final int BID_DELTA
- See Also:
- Constant Field Values
-
timer
@Autowired @Qualifier("serverTimer") private java.util.concurrent.ScheduledExecutorService timer
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
factory
@Autowired private EngineFactory factory
-
-
Method Detail
-
init
@PostConstruct private void init()
-
unregister
@PreDestroy private void unregister()
-
handleBid
public void handleBid(AuctionBid bid)
-
handleBidLevelChange
public void handleBidLevelChange(AuctionBidLevel change)
-
getChildren
public java.util.List<AbstractEngine> getChildren()
Description copied from class:AbstractEngine
Any engine may hold various child engines. This is the way to retrieve them. If there are no child engines, return an empty list. Subclasses have to implement this in the proper way.- Specified by:
getChildren
in classAbstractEngine
- Returns:
- list of child engines.
-
-