use of org.glassfish.internal.embedded.Port in project Payara by payara.
the class WebContainerImpl method addWebListener.
private void addWebListener(WebListener webListener, String vsId) throws ConfigException, GlassFishException {
if (!initialized) {
init();
}
if (getWebListener(webListener.getId()) != null) {
throw new ConfigException("Connector with name '" + webListener.getId() + "' already exsits");
}
listenerName = webListener.getId();
try {
Ports ports = habitat.getService(Ports.class);
Port port = ports.createPort(webListener.getPort());
bind(port, webListener, vsId);
} catch (java.io.IOException ex) {
throw new ConfigException(ex);
}
webListener.setWebContainer(this);
if (log.isLoggable(Level.INFO)) {
log.info("Added connector " + webListener.getId() + " port " + webListener.getPort() + " to virtual server " + vsId);
}
}
Aggregations