/** * Start the server. */ public void start() throws DeploymentException { try { if (server == null) { server = ServerContainerFactory.createServerContainer(properties); for (Class<?> clazz : configuration) { server.addEndpoint(clazz); } server.start(contextPath, port); if (server instanceof TyrusServerContainer) { this.port = ((TyrusServerContainer) server).getPort(); } LOGGER.info("WebSocket Registered apps: URLs all start with ws://" + this.hostName + ":" + getPort()); LOGGER.info("WebSocket server started."); } } catch (IOException e) { throw new DeploymentException(e.getMessage(), e); } }
/** * Start the server. */ public void start() throws DeploymentException { try { if (server == null) { server = ServerContainerFactory.createServerContainer(properties); for (Class<?> clazz : configuration) { server.addEndpoint(clazz); } server.start(contextPath, port); if (server instanceof TyrusServerContainer) { this.port = ((TyrusServerContainer) server).getPort(); } LOGGER.info("WebSocket Registered apps: URLs all start with ws://" + this.hostName + ":" + getPort()); LOGGER.info("WebSocket server started."); } } catch (IOException e) { throw new DeploymentException(e.getMessage(), e); } }