public class CLI extends Object implements AutoCloseable
| Constructor and Description |
|---|
CLI(URL jenkins)
Deprecated.
Specific to
Mode#REMOTING. |
CLI(URL jenkins,
ExecutorService exec)
Deprecated.
Use
CLIConnectionFactory to create CLI |
CLI(URL jenkins,
ExecutorService exec,
String httpsProxyTunnel)
Deprecated.
Use
CLIConnectionFactory to create CLI |
| Modifier and Type | Method and Description |
|---|---|
static int |
_main(String[] _args) |
PublicKey |
authenticate(Iterable<KeyPair> privateKeys)
Deprecated.
Specific to
Mode#REMOTING. |
PublicKey |
authenticate(KeyPair key)
Deprecated.
Specific to
Mode#REMOTING. |
void |
close()
Shuts down the channel and closes the underlying connection.
|
int |
execute(List<String> args) |
int |
execute(List<String> args,
InputStream stdin,
OutputStream stdout,
OutputStream stderr) |
int |
execute(String... args) |
hudson.remoting.Channel |
getChannel()
Accesses the underlying communication channel.
|
protected CliPort |
getCliTcpPort(URL url)
Deprecated.
Specific to
Mode#REMOTING. |
boolean |
hasCommand(String name)
Returns true if the named command exists.
|
static KeyPair |
loadKey(File f) |
static KeyPair |
loadKey(File f,
String passwd)
Loads RSA/DSA private key in a PEM format into
KeyPair. |
static KeyPair |
loadKey(String pemString) |
static KeyPair |
loadKey(String pemString,
String passwd)
Loads RSA/DSA private key in a PEM format into
KeyPair. |
static void |
main(String[] _args) |
void |
upgrade()
Attempts to lift the security restriction on the underlying channel.
|
@Deprecated public CLI(URL jenkins) throws IOException, InterruptedException
Mode#REMOTING.IOExceptionInterruptedException@Deprecated public CLI(URL jenkins, ExecutorService exec) throws IOException, InterruptedException
CLIConnectionFactory to create CLIIOExceptionInterruptedException@Deprecated public CLI(URL jenkins, ExecutorService exec, String httpsProxyTunnel) throws IOException, InterruptedException
CLIConnectionFactory to create CLIIOExceptionInterruptedException@Deprecated protected CliPort getCliTcpPort(URL url) throws IOException
Mode#REMOTING.IOExceptionpublic void close()
throws IOException,
InterruptedException
close in interface AutoCloseableIOExceptionInterruptedExceptionpublic int execute(List<String> args, InputStream stdin, OutputStream stdout, OutputStream stderr)
public int execute(String... args)
public boolean hasCommand(String name)
public hudson.remoting.Channel getChannel()
public void upgrade()
SecurityException - If we fail to upgrade the connection.public static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException
KeyPair.IOExceptionGeneralSecurityExceptionpublic static KeyPair loadKey(File f) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException
KeyPair.IOExceptionGeneralSecurityExceptionpublic static KeyPair loadKey(String pemString) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityException@Deprecated public PublicKey authenticate(Iterable<KeyPair> privateKeys) throws IOException, GeneralSecurityException
Mode#REMOTING.IOExceptionGeneralSecurityException@Deprecated public PublicKey authenticate(KeyPair key) throws IOException, GeneralSecurityException
Mode#REMOTING.IOExceptionGeneralSecurityExceptionCopyright © 2004–2018. All rights reserved.