Class BKCommand<CommandFlagsT extends CliFlags>
- java.lang.Object
-
- org.apache.bookkeeper.tools.framework.CliCommand<BKFlags,CommandFlagsT>
-
- org.apache.bookkeeper.tools.common.BKCommand<CommandFlagsT>
-
- Direct Known Subclasses:
BookieCommand,ClientCommand,CookieCommand
public abstract class BKCommand<CommandFlagsT extends CliFlags> extends CliCommand<BKFlags,CommandFlagsT>
Base bk command class.
-
-
Field Summary
-
Fields inherited from class org.apache.bookkeeper.tools.framework.CliCommand
spec
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBKCommand(CliSpec<CommandFlagsT> spec)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanacceptServiceUri(ServiceURI serviceURI)intapply(java.lang.String commandName, org.apache.commons.configuration2.CompositeConfiguration conf, java.lang.String[] args)Made this as public for allowing old bookie shell use new cli command.protected abstract booleanapply(ServiceURI serviceURI, org.apache.commons.configuration2.CompositeConfiguration conf, BKFlags globalFlags, CommandFlagsT cmdFlags)protected booleanapply(BKFlags bkFlags, CommandFlagsT cmdFlags)java.lang.Booleanapply(BKFlags globalFlags, java.lang.String[] args)Process the command.-
Methods inherited from class org.apache.bookkeeper.tools.framework.CliCommand
category, description, getUsage, name, path, setParent, usage
-
-
-
-
Constructor Detail
-
BKCommand
protected BKCommand(CliSpec<CommandFlagsT> spec)
-
-
Method Detail
-
apply
public java.lang.Boolean apply(BKFlags globalFlags, java.lang.String[] args)
Description copied from interface:CommandProcess the command.- Specified by:
applyin interfaceCommand<CommandFlagsT extends CliFlags>- Overrides:
applyin classCliCommand<BKFlags,CommandFlagsT extends CliFlags>args- command args- Returns:
- true if successfully apply the args, otherwise false
-
apply
@Private public int apply(java.lang.String commandName, org.apache.commons.configuration2.CompositeConfiguration conf, java.lang.String[] args)
Made this as public for allowing old bookie shell use new cli command. This should be removed once we get rid of the old bookie shell.
-
apply
protected boolean apply(BKFlags bkFlags, CommandFlagsT cmdFlags)
-
acceptServiceUri
protected boolean acceptServiceUri(ServiceURI serviceURI)
-
apply
protected abstract boolean apply(ServiceURI serviceURI, org.apache.commons.configuration2.CompositeConfiguration conf, BKFlags globalFlags, CommandFlagsT cmdFlags)
-
-