Package me.hsgamer.hscore.request
Class ConsumerRequestManager<T>
java.lang.Object
me.hsgamer.hscore.request.RequestManager<UUID,T>
me.hsgamer.hscore.request.ConsumerRequestManager<T>
- Type Parameters:
T- the type of the argument
A simple request manager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRequest(@NotNull UUID uuid, @NotNull BiConsumer<UUID, T> consumer) Add a requestaddRequest(@NotNull UUID uuid, @NotNull Consumer<T> consumer) Add a requestMethods inherited from class me.hsgamer.hscore.request.RequestManager
addRequest, addRequest, completeRequest, completeRequest, removeRequest, removeRequests
-
Constructor Details
-
ConsumerRequestManager
public ConsumerRequestManager()
-
-
Method Details
-
addRequest
public CompletableFuture<Void> addRequest(@NotNull @NotNull UUID uuid, @NotNull @NotNull BiConsumer<UUID, T> consumer) Add a request- Parameters:
uuid- the unique idconsumer- the consumer when the request is called
-
addRequest
public CompletableFuture<Void> addRequest(@NotNull @NotNull UUID uuid, @NotNull @NotNull Consumer<T> consumer) Add a request- Parameters:
uuid- the unique idconsumer- the consumer when the request is called
-