Class CommandRegistry
java.lang.Object
org.aksw.vshell.registry.CommandRegistry
- All Implemented Interfaces:
CommandCatalog
Registry / cache for whether a command is available on a certain exec site.
Should only be used with resolved commands such as /bin/foo
in contrast to names such as foo.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.Multimap<ExecSite, CommandBinding> Return all known locations for a command.getAvailability(String command, ExecSite execSite) Optional<com.google.common.collect.Multimap<ExecSite, CommandBinding>> getKnownExecSites(String command) Return a snapshot of the set of exec sites where the command is known to be present.put(String command, ExecSite execSite, String cmd, ArgsTransform argsTransform) put(String command, ExecSite execSite, CommandBinding cmd) putAll(String command, com.google.common.collect.Multimap<ExecSite, CommandBinding> cmdMap) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommandCatalog
get, getExecSites
-
Constructor Details
-
CommandRegistry
public CommandRegistry()
-
-
Method Details
-
getKnownExecSites
public Optional<com.google.common.collect.Multimap<ExecSite, CommandBinding>> getKnownExecSites(String command) Return a snapshot of the set of exec sites where the command is known to be present. Return null if there is no entry for the command. Empty map if there is an entry with no known locations. -
getAvailability
-
put
-
put
public CommandRegistry put(String command, ExecSite execSite, String cmd, ArgsTransform argsTransform) -
put
-
putAll
public CommandRegistry putAll(String command, com.google.common.collect.Multimap<ExecSite, CommandBinding> cmdMap) -
get
Description copied from interface:CommandCatalogReturn all known locations for a command. Candidate locations where the command is unavailable (e.g. on the host) must have been filtered out.- Specified by:
getin interfaceCommandCatalog
-