/** Shut down communication with the autosampler. */ public void disconnect() { if (m_reader != null) { m_reader.quit(); m_reader.interrupt(); } if (m_sender != null) { m_sender.quit(); m_sender.interrupt(); } if (m_statusPoller != null) { m_statusPoller.quit(); m_statusPoller.interrupt(); } if (m_CryoSocket != null) { m_CryoSocket.disconnect(); m_CryoSocket = null; } }
/** Zakończenie modelu i zwolnienie wszystkich zasobów. */ public void close() { // inQueue.add(new ProgramClosingEvent()); multicast.close(); sender.interrupt(); server.close(); for (Connection con : connections.values()) { if (con.getCurrentConnection() != null) { con.getCurrentConnection().close(); } } executor.shutdown(); timer.shutdown(); }