From e45f734e8b054f0cb5d84510b9fdf69301279ef3 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Fri, 23 Dec 2011 14:15:06 -0800 Subject: [PATCH] documenting the behaviour --- core/src/main/java/hudson/cli/CLICommand.java | 9 +++++++++ core/src/main/java/hudson/cli/declarative/CLIMethod.java | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/core/src/main/java/hudson/cli/CLICommand.java b/core/src/main/java/hudson/cli/CLICommand.java index f10f345642..47506a9944 100644 --- a/core/src/main/java/hudson/cli/CLICommand.java +++ b/core/src/main/java/hudson/cli/CLICommand.java @@ -127,6 +127,10 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable { /** * {@link Channel} that represents the CLI JVM. You can use this to * execute {@link Callable} on the CLI JVM, among other things. + * + *

+ * Starting 1.445, CLI transports are not required to provide a channel + * (think of sshd, telnet, etc), so in such a case this field is null. */ public transient Channel channel; @@ -135,6 +139,11 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable { */ public transient Locale locale; + /** + * Set by the caller of the CLI system if the transport already provides + * authentication. Due to the compatibility issue, we still allow the user + * to use command line switches to authenticate as other users. + */ private transient Authentication transportAuth; /** diff --git a/core/src/main/java/hudson/cli/declarative/CLIMethod.java b/core/src/main/java/hudson/cli/declarative/CLIMethod.java index bec31d9a7a..d4e6c96ed4 100644 --- a/core/src/main/java/hudson/cli/declarative/CLIMethod.java +++ b/core/src/main/java/hudson/cli/declarative/CLIMethod.java @@ -66,4 +66,9 @@ public @interface CLIMethod { * CLI command name. Used as {@link CLICommand#getName()} */ String name(); + + /** + * + */ + boolean usesChannel() default false; } -- GitLab