/** *Set additional type-specific information on the target module ID. *@param tmid the target module ID for the Web app *@param targetImpl the target identifying which installation of this module is of interest *@param webHost the host and port for this target */ private void setWebApplicationTargetModuleIDInfo(TargetModuleID tmid, HostAndPort webHost) throws MalformedURLException, IOException { String path = deploymentFacility.getContextRoot(tmid.getModuleID()); if (!path.startsWith("/")) { //NOI18N path = "/" + path; //NOI18N } URL webURL = new URL("http", webHost.getHost(), webHost.getPort(), path); //NOI18N if (tmid instanceof TargetModuleIDImpl) { ((TargetModuleIDImpl)tmid).setWebURL(webURL.toExternalForm()); } }
/** *Set additional type-specific information on the target module ID. *@param tmid the target module ID for the Web app *@param targetImpl the target identifying which installation of this module is of interest *@param webHost the host and port for this target */ private void setWebApplicationTargetModuleIDInfo(TargetModuleID tmid, HostAndPort webHost) throws MalformedURLException, IOException { String path = deploymentFacility.getContextRoot(tmid.getModuleID()); if (!path.startsWith("/")) { //NOI18N path = "/" + path; //NOI18N } URL webURL = new URL("http", webHost.getHost(), webHost.getPort(), path); //NOI18N if (tmid instanceof TargetModuleIDImpl) { ((TargetModuleIDImpl)tmid).setWebURL(webURL.toExternalForm()); } }
private String adminPortInUse(List<HostAndPort> adminAddresses) { // it returns a String for logging --- if desired for (HostAndPort addr : adminAddresses) { if (!NetUtils.isPortFree(addr.getHost(), addr.getPort())) return strings.get("ServerRunning", Integer.toString(addr.getPort())); } return null; }
private String adminPortInUse(List<HostAndPort> adminAddresses) { // it returns a String for logging --- if desired for (HostAndPort addr : adminAddresses) { if (!NetUtils.isPortFree(addr.getHost(), addr.getPort())) return strings.get("ServerRunning", Integer.toString(addr.getPort())); } return null; }
/** * This method will delete the entry in the .asadminpass file if exists */ private void deleteLoginInfo() throws CommandException, StoreException { LoginInfoStore store = LoginInfoStoreFactory.getDefaultStore(); store.remove(adminAddress.getHost(), adminAddress.getPort()); } }
private boolean isRunning(File nodeDirChild, String serverName) throws CommandException { try { File serverDir = new File(nodeDirChild, serverName); File configDir = new File(serverDir, "config"); File domainXml = new File(configDir, "domain.xml"); if (!domainXml.exists()) return false; MiniXmlParser parser = new MiniXmlParser(domainXml, serverName); List<HostAndPort> addrSet = parser.getAdminAddresses(); if (addrSet.size() <= 0) throw new CommandException(strings.get("NoAdminPort")); HostAndPort addr = addrSet.get(0); return isRunning(addr.getHost(), addr.getPort()); } catch (MiniXmlParserException ex) { throw new CommandException(strings.get("NoAdminPortEx", ex), ex); } }
if (subType.equals("war")) { URL webURL = new URL("http", hostAndPort.getHost(), hostAndPort.getPort(), infoParts.get(2)); childTmid.setWebURL(webURL.toExternalForm());
if (subType.equals("war")) { URL webURL = new URL("http", hostAndPort.getHost(), hostAndPort.getPort(), infoParts.get(2)); childTmid.setWebURL(webURL.toExternalForm());
/** * Convenience method to set the host and port (and secure) * attributes from a HostAndPort object. * * @param address the HostAndPort object from which to set the attributes */ public void setHostAndPort(HostAndPort address) { setHost(address.getHost()); setPort(address.getPort()); setSecure(address.isSecure()); }
/** * Convenience method to set the host and port (and secure) * attributes from a HostAndPort object. * * @param address the HostAndPort object from which to set the attributes */ public void setHostAndPort(HostAndPort address) { setHost(address.getHost()); setPort(address.getPort()); setSecure(address.isSecure()); }
private void checkRunning() throws CommandException { programOpts.setInteractive(false); // don't prompt for password if (isRunning(adminAddress.getHost(), adminAddress.getPort()) && isThisDAS(getDomainRootDir())) { String msg = strings.get("domain.is.running", getDomainName(), getDomainRootDir()); throw new IllegalStateException(msg); } }
private void checkRunning() throws CommandException { programOpts.setInteractive(false); // don't prompt for password if (isRunning(adminAddress.getHost(), adminAddress.getPort()) && isThisDAS(getDomainRootDir())) { String msg = strings.get("domain.is.running", getDomainName(), getDomainRootDir()); throw new IllegalStateException(msg); } }
cf.addRow(new Object[] { dn, di.adminAddr.getHost(), di.adminAddr.getPort(), di.status,
if (NetUtils.isRunning(addr.getHost(), addr.getPort())) { alive = true; break pinged;
if (NetUtils.isRunning(addr.getHost(), addr.getPort())) { alive = true; break pinged;
if (isRunning(adminAddress.getHost(), adminAddress.getPort())) throw new CommandException(strings.get("domain.is.running", getDomainName(), getDomainRootDir()));
if (isRunning(adminAddress.getHost(), adminAddress.getPort())) throw new CommandException(strings.get("domain.is.running", getDomainName(), getDomainRootDir()));