Package org.rspeer.game.script.tools
Class RestockTask
- java.lang.Object
-
- org.rspeer.game.script.Task
-
- org.rspeer.game.script.tools.RestockTask
-
- All Implemented Interfaces:
Comparable<Task>
public class RestockTask extends Task
A default implementation of Task to perform the restocking of items. You can submit items to buy or sell viaStockMarketService
, any submissions will set the task active. This task is blocking and initialized with a priority of 1000.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RestockTask.CollectionStrategy
static interface
RestockTask.RetryStrategy
-
Field Summary
Fields Modifier and Type Field Description static Position
GRAND_EXCHANGE
-
Constructor Summary
Constructors Constructor Description RestockTask(StockMarketService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
RestockTask.CollectionStrategy
getCollectionStrategy()
RestockTask.RetryStrategy
getRetryStrategy()
Consumer<Task>
getWalkToGrandExchangeFunction()
void
setCollectionStrategy(RestockTask.CollectionStrategy collectionStrategy)
void
setRetryStrategy(RestockTask.RetryStrategy retryStrategy)
void
setWalkToGrandExchangeFunction(Consumer<Task> walkToGrandExchange)
-
Methods inherited from class org.rspeer.game.script.Task
compareTo, getParent, sleep, sleepUntil, sleepUntil, sleepWhile
-
-
-
-
Field Detail
-
GRAND_EXCHANGE
public static final Position GRAND_EXCHANGE
-
-
Constructor Detail
-
RestockTask
@Inject public RestockTask(StockMarketService service)
-
-
Method Detail
-
setWalkToGrandExchangeFunction
public void setWalkToGrandExchangeFunction(Consumer<Task> walkToGrandExchange)
-
getRetryStrategy
public RestockTask.RetryStrategy getRetryStrategy()
-
setRetryStrategy
public void setRetryStrategy(RestockTask.RetryStrategy retryStrategy)
-
getCollectionStrategy
public RestockTask.CollectionStrategy getCollectionStrategy()
-
setCollectionStrategy
public void setCollectionStrategy(RestockTask.CollectionStrategy collectionStrategy)
-
-