示例#1
0
  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);
  }
示例#2
0
 public boolean removeConnection(Connection conn) {
   return connections.remove(conn);
 }