Class StockMarketService
java.lang.Object
org.rspeer.game.service.stockmarket.StockMarketService
- All Implemented Interfaces:
Service
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
notify
(StockMarketEvent event) void
void
setCancelConsumer
(BiConsumer<StockMarketEntry, Integer> cancelConsumer) void
submit
(StockMarketable.Type type, ItemEntry entry) void
submit
(StockMarketable.Type type, StockMarketEntry entry) Submits an offer to buy or sell.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rspeer.event.Service
onSubscribe
-
Constructor Details
-
StockMarketService
public StockMarketService()
-
-
Method Details
-
submit
Submits an offer to buy or sell. Doing so will enable isAttentionRequired and thus should trigger restock tasks. -
submit
-
isWaiting
public boolean isWaiting()- Returns:
- true if offers are in progress
-
getWaiting
-
getCancel
-
isAttentionRequired
public boolean isAttentionRequired()- Returns:
- true if the player has tasks to do at the g/e
-
getNextBuyOffer
-
getNextSellOffer
-
notify
-
onUnsubscribe
public void onUnsubscribe()- Specified by:
onUnsubscribe
in interfaceService
-
getCancelConsumer
-
setCancelConsumer
-