code: public DeploymentManager getDeploymentManager(String uri, String userName, String password) throws DeploymentManagerCreationException
     {
        Set clone;
        synchronized (deploymentFactories)
        {
           clone = new HashSet(deploymentFactories);
        }
        for (Iterator i = clone.iterator(); i.hasNext();)
        {
           DeploymentFactory factory = (DeploymentFactory)i.next();
           if (factory.handlesURI(uri))
              return factory.getDeploymentManager(uri, userName, password);
        }
        throw new DeploymentManagerCreationException("No deployment manager for uri=" + uri);
     }
docs: Get a connected deployment manager
  
  @param uri the uri of the deployment manager
  @param userName the user name
  @param password the password
  @return the deployment manager
  @throws DeploymentManagerCreationException