コード例 #1
0
 public DeploymentManagerTarget(URI deployURI, String username, String password) {
   ROOT_LOGGER.debugf("new DeploymentManagerTarget: %s", deployURI);
   try {
     URIParser parser = new URIParser(deployURI);
     String serverHost = parser.getParameter("serverHost");
     String serverPort = parser.getParameter("serverPort");
     String host = serverHost != null ? serverHost : "127.0.0.1";
     Integer port = serverPort != null ? Integer.parseInt(serverPort) : 9999;
     if (username != null && password != null) {
       this.modelControllerClient =
           ModelControllerClient.Factory.create(
               host, port, getCallbackHandler(username, password));
     } else {
       this.modelControllerClient = ModelControllerClient.Factory.create(host, port);
     }
     this.deploymentManager = ServerDeploymentManager.Factory.create(modelControllerClient);
     this.deployURI = deployURI;
   } catch (UnknownHostException ex) {
     throw new IllegalArgumentException(MESSAGES.cannotConnectToManagementTarget(deployURI), ex);
   }
 }
コード例 #2
0
 public RemoteDeployer() throws IOException {
   deploymentManager = ServerDeploymentManager.Factory.create(address, PORT);
 }