/** @param baseConnection */
 protected HPCCECLDirectClient(Connection baseConnection) {
   this(
       baseConnection.getProtocol(),
       baseConnection.getHost(),
       baseConnection.getPort(),
       baseConnection.getUserName(),
       baseConnection.getPassword());
 }
  public synchronized void update(
      String protocol,
      String targetWsECLWatchAddress,
      String targetWsECLWatchPort,
      String username,
      String password) {
    Connection newConnection =
        new Connection(protocol, targetWsECLWatchAddress, targetWsECLWatchPort);
    newConnection.setCredentials(username, password);

    updateConnection(newConnection);
  }
 /**
  * Instantiates HPCCWsClient, communicates with HPCC over given protocol, and provides user/pass
  * credentials
  *
  * @param protocol - http | https
  * @param targetWsECLWatchAddress - The address of the WsECLWatch ESP on the Target HPCC System
  *     e.g. 192.168.1.100
  * @param targetWsECLWatchPort - The port on which WsECLWatch ESP is listening on the Target HPCC
  *     System usually 8010
  * @param username - ESP Username
  * @param password - ESP Password
  */
 protected HPCCWsClient(
     String protocol,
     String targetWsECLWatchAddress,
     String targetWsECLWatchPort,
     String username,
     String password) {
   connection = new Connection(protocol, targetWsECLWatchAddress, targetWsECLWatchPort);
   connection.setCredentials(username, password);
 }
  /**
   * Initializes the service's underlying soap proxy. Should only be used by constructors
   *
   * @param baseURL Target service base URL
   * @param user User credentials
   * @param pass User credentials
   */
  private void initWsEclDirectServiceSoapProxy(String baseURL, String user, String pass) {
    wsEclDirectServiceSoapProxy = new EclDirectServiceSoapProxy(baseURL);

    if (wsEclDirectServiceSoapProxy != null) {
      EclDirectServiceSoap wsEclDirectServiceSoap =
          wsEclDirectServiceSoapProxy.getEclDirectServiceSoap();
      if (wsEclDirectServiceSoap != null) {
        if (user != null && pass != null)
          Connection.initStub((Stub) wsEclDirectServiceSoap, user, pass);
      }
    }
  }
 /**
  * @return provides fileSprayClient for direct method execution
  * @throws Exception
  */
 public HPCCWsAttributesClient getWsAttributesClient(String wsAttributesPort) {
   synchronized (connectionLock) {
     Connection tempConn =
         new Connection(connection.getProtocol(), connection.getHost(), wsAttributesPort);
     tempConn.setCredentials(connection.getUserName(), connection.getPassword());
     return (HPCCWsAttributesClient) SubClients.get(HPCCWsAttributesClient.get(tempConn));
   }
 }
 public String getPassword() {
   return connection.getPassword();
 }
 public String getUserName() {
   return connection.getUserName();
 }
 public int getPortInt() {
   return connection.getPortInt();
 }
 public String getHost() {
   return connection.getHost();
 }
 public String getProtocol() {
   return connection.getProtocol();
 }
 /**
  * @param protocol
  * @param targetHost
  * @param targetPort
  * @param user
  * @param pass
  */
 protected HPCCECLDirectClient(
     String protocol, String targetHost, String targetPort, String user, String pass) {
   String address = Connection.buildUrl(protocol, targetHost, targetPort, ECLDIRECTWSDLURI);
   initWsEclDirectServiceSoapProxy(address, user, pass);
 }