hudson.cli
Class CLIConnectionFactory

java.lang.Object
  extended by hudson.cli.CLIConnectionFactory

public class CLIConnectionFactory
extends Object

Fluent-API to instantiate CLI.

Author:
Kohsuke Kawaguchi

Constructor Summary
CLIConnectionFactory()
           
 
Method Summary
 CLIConnectionFactory authorization(String value)
          For CLI connection that goes through HTTP, sometimes you need to pass in the custom authentication header (before Jenkins even get to authenticate the CLI channel.) This method lets you specify the value of this header.
 CLIConnectionFactory basicAuth(String userInfo)
           
 CLIConnectionFactory basicAuth(String username, String password)
          Convenience method to call authorization with the HTTP basic authentication.
 CLI connect()
           
 CLIConnectionFactory executorService(ExecutorService es)
          This ExecutorService is used to execute closures received from the server.
 CLIConnectionFactory httpsProxyTunnel(String value)
          Configures the HTTP proxy that we use for making a plain TCP/IP connection.
 CLIConnectionFactory url(String jenkins)
           
 CLIConnectionFactory url(URL jenkins)
          Top URL of the Jenkins to connect to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLIConnectionFactory

public CLIConnectionFactory()
Method Detail

url

public CLIConnectionFactory url(URL jenkins)
Top URL of the Jenkins to connect to.


url

public CLIConnectionFactory url(String jenkins)
                         throws MalformedURLException
Throws:
MalformedURLException

executorService

public CLIConnectionFactory executorService(ExecutorService es)
This ExecutorService is used to execute closures received from the server.


httpsProxyTunnel

public CLIConnectionFactory httpsProxyTunnel(String value)
Configures the HTTP proxy that we use for making a plain TCP/IP connection. "host:port" that points to an HTTP proxy or null.


authorization

public CLIConnectionFactory authorization(String value)
For CLI connection that goes through HTTP, sometimes you need to pass in the custom authentication header (before Jenkins even get to authenticate the CLI channel.) This method lets you specify the value of this header.


basicAuth

public CLIConnectionFactory basicAuth(String username,
                                      String password)
Convenience method to call authorization with the HTTP basic authentication.


basicAuth

public CLIConnectionFactory basicAuth(String userInfo)

connect

public CLI connect()
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException


Copyright © 2004-2013. All Rights Reserved.