class StreamConnectionManager {

  public StreamConnection openConnection(final StreamConnectionId streamConnectionId) {
    Objects.requireNonNull(streamConnectionId);

    // If the connection is already open, then return it. Otherwise, return a new Connection.
    return connections.computeIfAbsent(streamConnectionId, StreamConnection::new);
  }

}