/* */ public synchronized void close() /* */ throws IOException /* */ { /* 399 */ boolean bool1 = logger.traceOn(); /* 400 */ boolean bool2 = logger.debugOn(); /* */ /* 402 */ if (bool1) logger.trace("close", "closing"); /* */ /* 404 */ Object localObject1 = null; /* */ try { /* 406 */ if (bool2) logger.debug("close", "closing Server"); /* 407 */ closeServer(); /* */ } catch (IOException localIOException1) { /* 409 */ if (bool1) logger.trace("close", "Failed to close server: " + localIOException1); /* 410 */ if (bool2) logger.debug("close", localIOException1); /* 411 */ localObject1 = localIOException1; /* */ } /* */ /* 414 */ if (bool2) logger.debug("close", "closing Clients"); /* */ while (true) /* */ { /* 417 */ synchronized (this.clientList) { /* 418 */ if (bool2) logger.debug("close", "droping dead references"); /* 419 */ dropDeadReferences(); /* */ /* 421 */ if (bool2) logger.debug("close", "client count: " + this.clientList.size()); /* 422 */ if (this.clientList.size() == 0) /* */ { /* */ break; /* */ } /* */ /* 428 */ Iterator localIterator = this.clientList.iterator(); /* 429 */ if (localIterator.hasNext()) { /* 430 */ WeakReference localWeakReference = (WeakReference) localIterator.next(); /* 431 */ RMIConnection localRMIConnection = (RMIConnection) localWeakReference.get(); /* 432 */ localIterator.remove(); /* 433 */ if (localRMIConnection != null) { /* */ try { /* 435 */ localRMIConnection.close(); /* */ } catch (IOException localIOException2) { /* 437 */ if (bool1) /* 438 */ logger.trace("close", "Failed to close client: " + localIOException2); /* 439 */ if (bool2) logger.debug("close", localIOException2); /* 440 */ if (localObject1 == null) { /* 441 */ localObject1 = localIOException2; /* */ } /* */ } /* */ } /* */ } /* */ } /* */ } /* */ /* 449 */ if (this.notifBuffer != null) { /* 450 */ this.notifBuffer.dispose(); /* */ } /* 452 */ if (localObject1 != null) { /* 453 */ if (bool1) logger.trace("close", "close failed."); /* 454 */ throw localObject1; /* */ } /* */ /* 457 */ if (bool1) logger.trace("close", "closed."); /* */ }
public void close() throws IOException { synchronized (this) { if (closed) return; connected = false; closed = true; if (notificationHandler != null) notificationHandler.stop(); if (heartbeat != null) heartbeat.stop(); if (connection != null) connection.close(); connection = null; rmiServer = null; } emitter.sendConnectionNotificationClosed(); }