コード例 #1
0
 @Override
 public void close() throws IOException {
   if (destroyExecutor) {
     executorService.shutdown();
   }
   if (endpoint != null)
     try {
       endpoint.close();
     } catch (IOException e) {
       // ignore
     }
   if (destroyExecutor) {
     executorService.shutdownNow();
   }
 }
コード例 #2
0
  public void stop() throws IOException {
    log.infof("Stopping JMX Remoting Server %s", Version.getVersionString());

    // Services using an existing Remoting installation only need to stop the JMXConnectorServer
    // to disassociate it from Remoting.
    if (connectorServer != null) {
      connectorServer.stop();
    }
    if (server != null) {
      server.close();
    }

    if (endpoint != null) {
      endpoint.close();
    }
  }
コード例 #3
0
 public synchronized void close() {
   try {
     if (connection != null) {
       connection.close();
     }
   } catch (IOException e) {
     AppClientLogger.ROOT_LOGGER.exceptionClosingConnection(e);
   }
   try {
     if (endpoint != null) {
       endpoint.close();
     }
   } catch (IOException e) {
     AppClientLogger.ROOT_LOGGER.exceptionClosingConnection(e);
   }
 }
コード例 #4
0
 private void stopServer() throws IOException {
   remoteNamingService.stop();
   server.close();
   endpoint.close();
   serverStopped = true;
 }