diff options
Diffstat (limited to 'gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java')
-rw-r--r-- | gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java index 3511c71641..16461b6b06 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/DefaultCommandModule.java @@ -14,6 +14,7 @@ package com.google.gerrit.sshd.commands; +import com.google.gerrit.lifecycle.LifecycleModule; import com.google.gerrit.sshd.CommandModule; import com.google.gerrit.sshd.CommandName; import com.google.gerrit.sshd.Commands; @@ -34,11 +35,12 @@ public class DefaultCommandModule extends CommandModule { // SlaveCommandModule. command(gerrit).toProvider(new DispatchCommandProvider(gerrit)); - command(gerrit, "flush-caches").to(AdminFlushCaches.class); - command(gerrit, "ls-projects").to(ListProjects.class); + command(gerrit, "flush-caches").to(FlushCaches.class); + command(gerrit, "ls-projects").to(ListProjectsCommand.class); + command(gerrit, "ls-groups").to(ListGroupsCommand.class); command(gerrit, "query").to(Query.class); - command(gerrit, "show-caches").to(AdminShowCaches.class); - command(gerrit, "show-connections").to(AdminShowConnections.class); + command(gerrit, "show-caches").to(ShowCaches.class); + command(gerrit, "show-connections").to(ShowConnections.class); command(gerrit, "show-queue").to(ShowQueue.class); command(gerrit, "stream-events").to(StreamEvents.class); command(gerrit, "version").to(VersionCommand.class); @@ -48,7 +50,7 @@ public class DefaultCommandModule extends CommandModule { command(git, "upload-pack").to(Upload.class); command("ps").to(ShowQueue.class); - command("kill").to(AdminKill.class); + command("kill").to(KillCommand.class); command("scp").to(ScpCommand.class); // Honor the legacy hyphenated forms as aliases for the non-hyphenated forms @@ -58,5 +60,12 @@ public class DefaultCommandModule extends CommandModule { command("gerrit-receive-pack").to(Commands.key(git, "receive-pack")); command("suexec").to(SuExec.class); + + install(new LifecycleModule() { + @Override + protected void configure() { + listener().to(ShowCaches.StartupListener.class); + } + }); } } |