org.infinispan.cli.impl.ContextAwareCommandInvocationProvider Maven / Gradle / Ivy
package org.infinispan.cli.impl;
import java.util.Objects;
import org.aesh.command.invocation.CommandInvocation;
import org.aesh.command.invocation.CommandInvocationProvider;
import org.infinispan.cli.Context;
/**
* @author Tristan Tarrant <[email protected]>
* @since 10.0
**/
public class ContextAwareCommandInvocationProvider implements CommandInvocationProvider {
private final Context context;
public ContextAwareCommandInvocationProvider(Context context) {
Objects.requireNonNull(context);
this.context = context;
}
@Override
public CommandInvocation enhanceCommandInvocation(CommandInvocation commandInvocation) {
return new ContextAwareCommandInvocation(commandInvocation, context);
}
}