Class RequirementPostprocessor<C,R extends Requirement<C,R>>
java.lang.Object
org.incendo.cloud.processors.requirements.RequirementPostprocessor<C,R>
- Type Parameters:
C- command sender typeR- requirement type
- All Implemented Interfaces:
Consumer<org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C>>,Function<org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C>,,org.incendo.cloud.services.State> org.incendo.cloud.execution.postprocessor.CommandPostprocessor<C>,org.incendo.cloud.services.type.ConsumerService<org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C>>,org.incendo.cloud.services.type.Service<org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C>,,org.incendo.cloud.services.State> org.incendo.cloud.services.type.SideEffectService<org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C>>
@API(status=STABLE,
since="1.0.0")
public final class RequirementPostprocessor<C,R extends Requirement<C,R>>
extends Object
implements org.incendo.cloud.execution.postprocessor.CommandPostprocessor<C>
CommandPostprocessor that checks for requirements before the commands are executed.- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.incendo.cloud.services.type.ConsumerService
org.incendo.cloud.services.type.ConsumerService.PipeBurst -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic <C,R extends Requirement<C, R>>
RequirementPostprocessor<C,R> of(@NonNull org.incendo.cloud.key.CloudKey<Requirements<C, R>> requirementKey, @NonNull RequirementFailureHandler<C, R> failureHandler) Creates a newRequirementPostprocessor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.services.type.ConsumerService
handleMethods inherited from interface org.incendo.cloud.services.type.Service
apply, order
-
Method Details
-
of
public static <C,R extends Requirement<C, RequirementPostprocessor<C,R>> R> of(@NonNull org.incendo.cloud.key.CloudKey<Requirements<C, R>> requirementKey, @NonNull RequirementFailureHandler<C, R> failureHandler) Creates a newRequirementPostprocessor.- Type Parameters:
C- command sender typeR- requirement type- Parameters:
requirementKey- key that is used to store the requirements in theCommandMetafailureHandler- handler that gets invoked when a requirement is unmet- Returns:
- the postprocessor
-
accept
public void accept(@NonNull org.incendo.cloud.execution.postprocessor.CommandPostprocessingContext<C> context)
-