|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.cli.CLI
public class CLI
CLI entry point to Jenkins.
Constructor Summary | |
---|---|
CLI(URL jenkins)
|
|
CLI(URL jenkins,
ExecutorService exec)
Deprecated. Use CLIConnectionFactory to create CLI |
|
CLI(URL jenkins,
ExecutorService exec,
String httpsProxyTunnel)
Deprecated. Use CLIConnectionFactory to create CLI |
Method Summary | |
---|---|
static int |
_main(String[] _args)
|
PublicKey |
authenticate(Iterable<KeyPair> privateKeys)
Authenticate ourselves against the server. |
PublicKey |
authenticate(KeyPair key)
|
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CLI(URL jenkins) throws IOException, InterruptedException
IOException
InterruptedException
public CLI(URL jenkins, ExecutorService exec) throws IOException, InterruptedException
CLIConnectionFactory
to create CLI
IOException
InterruptedException
public CLI(URL jenkins, ExecutorService exec, String httpsProxyTunnel) throws IOException, InterruptedException
CLIConnectionFactory
to create CLI
IOException
InterruptedException
Method Detail |
---|
public void close() throws IOException, InterruptedException
IOException
InterruptedException
public int execute(List<String> args, InputStream stdin, OutputStream stdout, OutputStream stderr)
public int execute(List<String> args)
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 void main(String[] _args) throws Exception
Exception
public static int _main(String[] _args) throws Exception
Exception
public static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException
KeyPair
.
IOException
GeneralSecurityException
public static KeyPair loadKey(File f) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException
KeyPair
.
IOException
GeneralSecurityException
public static KeyPair loadKey(String pemString) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public PublicKey authenticate(Iterable<KeyPair> privateKeys) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public PublicKey authenticate(KeyPair key) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |