@Override public void cleanup(String remoteHost) { LOGGER.info("Cleanup client with address: {}", remoteHost); connectionListener.closed(remoteHost); }
@Override public void cleanup(String remoteHost) { LOGGER.info("Cleanup client with address: {}", remoteHost); connectionListener.closed(remoteHost); }
@Override public void closed(String port) { // TODO Auto-generated method stub // connectionListener.closed(port); if (active) { connectionListener.closed(port); return; } try { active = true; close(); } finally { active = false; } } };
@Override public void close() { LOGGER.info("Close the port."); if (port != null) { LOGGER.info("Stop the port."); port.stop(); if (portWorker != null) { synchronized (portWorker) { try { portWorker.join(5000L); } catch (InterruptedException ex) { LOGGER.warn("Wait for termination of port worker failed.", ex); } portWorker = null; } } port = null; } stopReceiverAndQueues(null); if (getConnectionListener() != null) { getConnectionListener().closed(connectedPortName); } // clear the connectedPortName connectedPortName = null; cleanupAfterClose(null); LOGGER.info("Close the port finished."); }
getConnectionListener().closed(requestedPortName);
@Override public void close() { LOGGER.info("Close the serial simulation."); isOpened = false; if (getConnectionListener() != null) { getConnectionListener().closed(requestedPortName); } requestedPortName = null; // if (simulationInterface != null) { // simulationInterface.stop(); // } releaseRootNode(); // release the simulation message receiver simulationMessageReceiver = null; cleanupAfterClose(null); // remove all simulators from the simulation registry SimulatorRegistry.getInstance().removeAll(); super.stopReceiverAndQueues(simulationMessageReceiver); }