/** * Return the port number. * @return int */ public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getProtocol().toLowerCase().equals("http") && port.getId().indexOf('/') < 0) return port; } return null; }
/** * Return the port number. * @return int */ public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getProtocol().toLowerCase().equals("http") && port.getId().indexOf('/') < 0) return port; } return null; }
/** * Return the port number. * @return int */ public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getProtocol().toLowerCase().equals("http") && port.getId().indexOf('/') < 0) return port; } return null; }
/** * Return the port number. * @return int */ public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getName().equals("HTTP Connector") && port.getId().indexOf('/') < 0) return port; } return null; }
/** * Return the port number. * @return int */ public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getName().equals("HTTP Connector") && port.getId().indexOf('/') < 0) return port; } return null; }
/** * Execute the command. */ public void execute() { // find old port number Iterator iterator = configuration.getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort temp = (ServerPort) iterator.next(); if (id.equals(temp.getId())) oldPort = temp.getPort(); } // make the change configuration.modifyServerPort(id, port); }