Interface RewardGrantHandler
public interface RewardGrantHandler
Delivers one immutable reward grant to its target player.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordImmutable identifiers used to make delivery retries safe. -
Method Summary
Modifier and TypeMethodDescriptionsettleAsync(RewardGrantHandler.RewardSettlementContext context, RewardGrant grant) Delivers a grant.booleansupports(RewardGrant grant) Returns whether this handler owns the supplied grant type.
-
Method Details
-
supports
Returns whether this handler owns the supplied grant type.- Parameters:
grant- grant to inspect- Returns:
- true when this handler can deliver the grant
-
settleAsync
CompletionStage<Void> settleAsync(RewardGrantHandler.RewardSettlementContext context, RewardGrant grant) Delivers a grant. Implementations must make the operation idempotent using the context key.- Parameters:
context- immutable settlement contextgrant- grant to deliver- Returns:
- completion stage completed after delivery
-