From fea7c52e9584ff117be8529b431b40590deef0ca Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 14 Mar 2014 12:49:50 -0400 Subject: [PATCH] Renamed SshContext->SshCommandContext for clarity of purpose --- .../ssh/{SshContext.java => SshCommandContext.java} | 4 ++-- .../java/com/gitblit/transport/ssh/SshCommandFactory.java | 2 +- .../com/gitblit/transport/ssh/commands/BaseCommand.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/main/java/com/gitblit/transport/ssh/{SshContext.java => SshCommandContext.java} (89%) diff --git a/src/main/java/com/gitblit/transport/ssh/SshContext.java b/src/main/java/com/gitblit/transport/ssh/SshCommandContext.java similarity index 89% rename from src/main/java/com/gitblit/transport/ssh/SshContext.java rename to src/main/java/com/gitblit/transport/ssh/SshCommandContext.java index 4c5786e4..de79dacc 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshContext.java +++ b/src/main/java/com/gitblit/transport/ssh/SshCommandContext.java @@ -15,12 +15,12 @@ */ package com.gitblit.transport.ssh; -public class SshContext { +public class SshCommandContext { private final SshDaemonClient client; private final String commandLine; - public SshContext(SshDaemonClient client, String commandLine) { + public SshCommandContext(SshDaemonClient client, String commandLine) { this.client = client; this.commandLine = commandLine; } diff --git a/src/main/java/com/gitblit/transport/ssh/SshCommandFactory.java b/src/main/java/com/gitblit/transport/ssh/SshCommandFactory.java index a52e62b8..788bdfb3 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshCommandFactory.java +++ b/src/main/java/com/gitblit/transport/ssh/SshCommandFactory.java @@ -133,7 +133,7 @@ public class SshCommandFactory implements CommandFactory { private void onStart() throws IOException { synchronized (this) { - SshContext ctx = new SshContext(session.getAttribute(SshDaemonClient.KEY), cmdLine); + SshCommandContext ctx = new SshCommandContext(session.getAttribute(SshDaemonClient.KEY), cmdLine); try { cmd = dispatcher; cmd.setArguments(argv); diff --git a/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java b/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java index a04c505f..f7ef2aa3 100644 --- a/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java +++ b/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java @@ -33,7 +33,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.gitblit.transport.ssh.AbstractSshCommand; -import com.gitblit.transport.ssh.SshContext; +import com.gitblit.transport.ssh.SshCommandContext; import com.gitblit.utils.IdGenerator; import com.gitblit.utils.WorkQueue; import com.gitblit.utils.WorkQueue.CancelableRunnable; @@ -52,7 +52,7 @@ public abstract class BaseCommand extends AbstractSshCommand { private String[] argv; /** Ssh context */ - protected SshContext ctx; + protected SshCommandContext ctx; /** The task, as scheduled on a worker thread. */ private final AtomicReference> task; @@ -66,7 +66,7 @@ public abstract class BaseCommand extends AbstractSshCommand { this.executor = w.getDefaultQueue(); } - public void setContext(SshContext ctx) { + public void setContext(SshCommandContext ctx) { this.ctx = ctx; } -- 2.39.5