Exemplo n.º 1
0
 /** Stop the server. */
 public synchronized void stop() {
   if (server != null) {
     server.stop();
     server = null;
     LOGGER.info("Websocket Server stopped.");
   }
 }
Exemplo n.º 2
0
 /** Start the server. */
 public synchronized void start() throws DeploymentException {
   try {
     if (server == null) {
       server =
           ServerContainerFactory.create(ENGINE_PROVIDER_CLASSNAME, rootPath, port, configuration);
       server.start();
       LOGGER.info(
           "WebSocket Registered apps: URLs all start with ws://"
               + this.hostName
               + ":"
               + this.port);
       LOGGER.info("WebSocket server started.");
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }