@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override public void removeEventListener() { port.removeEventListener(); } };
@Override public void removeEventListener() { sp.removeEventListener(); }
@Override public void removeEventListener() { sp.removeEventListener(); }
/** * Close this serial device */ public void close() { serialPort.removeEventListener(); IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); serialPort.close(); } }
/** * Close this serial device * */ public void close() { serialPort.removeEventListener(); IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); serialPort.close(); }
@Override public void close() { try { if (serialPort != null) { serialPort.removeEventListener(); outputStream.flush(); inputStream.close(); outputStream.close(); serialPort.close(); serialPort = null; inputStream = null; outputStream = null; synchronized (this) { this.notify(); } logger.debug("Serial port '{}' closed.", portName); } } catch (Exception e) { logger.error("Error closing serial port: '{}' ", portName, e); } }
public void close() { try { if (in != null) { in.close(); } if (out != null) { out.close(); } if (serialPort != null) { serialPort.notifyOnDataAvailable(false); serialPort.removeEventListener(); serialPort.close(); } } catch (Exception e) { } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
@Override protected void doClose() throws Exception { open = false; try { super.doClose(); } finally { if (serialPort != null) { serialPort.removeEventListener(); serialPort.close(); serialPort = null; } } }
/** * Disconnect the serial port connection to the Nikobus module. */ public void disconnect() { log.info("Closing Nikobus connection."); if (!isConnected()) { return; } lastEventTimestamp = 0; port.removeEventListener(); try { write(RS232_DISCONNECT); } catch (Exception e) { log.error("Could not send disconnect command", e); } if (port != null) { try { port.getInputStream().close(); port.getOutputStream().close(); } catch (IOException e) { log.error("Error closing port: {}", e.getMessage()); } port.close(); } }
if (port != null) { try { port.removeEventListener(); port.getInputStream().close(); port.getOutputStream().close();