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 protected
BKCommand(CliSpec<CommandFlagsT> spec)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
acceptServiceUri(ServiceURI serviceURI)
int
apply(java.lang.String commandName, org.apache.commons.configuration.CompositeConfiguration conf, java.lang.String[] args)
Made this as public for allowing old bookie shell use new cli command.protected abstract boolean
apply(ServiceURI serviceURI, org.apache.commons.configuration.CompositeConfiguration conf, BKFlags globalFlags, CommandFlagsT cmdFlags)
protected boolean
apply(BKFlags bkFlags, CommandFlagsT cmdFlags)
java.lang.Boolean
apply(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:Command
Process the command.- Specified by:
apply
in interfaceCommand<CommandFlagsT extends CliFlags>
- Overrides:
apply
in 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.configuration.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.configuration.CompositeConfiguration conf, BKFlags globalFlags, CommandFlagsT cmdFlags)
-
-