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()
Command
getPrimaryName
in interface Command
public Set<String> getNames()
Command
public String getDoc()
Command
public boolean isServerRequired()
isServerRequired
in interface Command
protected CommandResponse initializeResponse()
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.