Class CookieCommand<CookieFlagsT extends CliFlags>
- java.lang.Object
-
- org.apache.bookkeeper.tools.framework.CliCommand<BKFlags,CommandFlagsT>
-
- org.apache.bookkeeper.tools.common.BKCommand<CookieFlagsT>
-
- org.apache.bookkeeper.tools.cli.commands.cookie.CookieCommand<CookieFlagsT>
-
- Direct Known Subclasses:
CreateCookieCommand
,DeleteCookieCommand
,GenerateCookieCommand
,GetCookieCommand
,UpdateCookieCommand
abstract class CookieCommand<CookieFlagsT extends CliFlags> extends BKCommand<CookieFlagsT>
This is a mixin for cookie related commands to extends.
-
-
Field Summary
-
Fields inherited from class org.apache.bookkeeper.tools.framework.CliCommand
spec
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CookieCommand(CliSpec<CookieFlagsT> spec)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
apply(ServiceURI serviceURI, org.apache.commons.configuration.CompositeConfiguration conf, BKFlags globalFlags, CookieFlagsT cmdFlags)
protected abstract void
apply(RegistrationManager rm, CookieFlagsT cmdFlags)
BookieShell.Command
asShellCommand(java.lang.String shellCmdName, org.apache.commons.configuration.CompositeConfiguration conf)
protected BookieId
getBookieId(CookieFlagsT cmdFlags)
protected byte[]
readCookieDataFromFile(java.lang.String cookieFile)
-
Methods inherited from class org.apache.bookkeeper.tools.common.BKCommand
acceptServiceUri, apply, apply, apply
-
Methods inherited from class org.apache.bookkeeper.tools.framework.CliCommand
category, description, getUsage, name, path, setParent, usage
-
-
-
-
Constructor Detail
-
CookieCommand
protected CookieCommand(CliSpec<CookieFlagsT> spec)
-
-
Method Detail
-
apply
protected boolean apply(ServiceURI serviceURI, org.apache.commons.configuration.CompositeConfiguration conf, BKFlags globalFlags, CookieFlagsT cmdFlags)
- Specified by:
apply
in classBKCommand<CookieFlagsT extends CliFlags>
-
getBookieId
protected BookieId getBookieId(CookieFlagsT cmdFlags) throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
-
readCookieDataFromFile
protected byte[] readCookieDataFromFile(java.lang.String cookieFile) throws java.io.IOException
- Throws:
java.io.IOException
-
apply
protected abstract void apply(RegistrationManager rm, CookieFlagsT cmdFlags) throws java.lang.Exception
- Throws:
java.lang.Exception
-
asShellCommand
public BookieShell.Command asShellCommand(java.lang.String shellCmdName, org.apache.commons.configuration.CompositeConfiguration conf)
-
-