public void addConnection(Connection conn) { if (conn.getProtocol() != Connection.Protocol.DICOM) throw new IllegalArgumentException("protocol != DICOM - " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by Device: " + device.getDeviceName()); connections.add(conn); }
public boolean removeConnection(Connection conn) { return connections.remove(conn); }