public abstract class CommandBase extends Object implements Command
| Modifier | Constructor and Description |
|---|---|
protected |
CommandBase(List<String> names) |
protected |
CommandBase(List<String> names,
boolean serverRequired) |
protected |
CommandBase(List<String> names,
boolean serverRequired,
String doc) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDoc()
A string documenting this command (e.g., what it does, any arguments it
takes).
|
Set<String> |
getNames()
The set of all names that can be used to refer to this command (e.g.,
"configuration", "config", and "conf").
|
String |
getPrimaryName()
The name that is returned with the command response and that appears in
the list of all commands.
|
protected CommandResponse |
initializeResponse() |
boolean |
isServerRequired() |
protected CommandBase(List<String> names)
names - The possible names of this command, with the primary name first.public String getPrimaryName()
CommandgetPrimaryName in interface Commandpublic Set<String> getNames()
Commandpublic String getDoc()
Commandpublic boolean isServerRequired()
isServerRequired in interface Commandprotected CommandResponse initializeResponse()
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.