class EventSubscriptionManager implements ChainHeadChannel, FinalizedCheckpointChannel {

  public void registerClient(final SseClient sseClient) {
    LOG.trace("connected " + sseClient.hashCode());
    final List<String> allTopicsInContext =
        ListQueryParameterUtils.getParameterAsStringList(sseClient.ctx.queryParamMap(), TOPICS);
    sseClient.onClose(
        () -> {
          getTopics(allTopicsInContext).forEach(e -> eventClientMap.get(e).remove(sseClient));
          LOG.trace("disconnected " + sseClient.hashCode());
        });

    getTopics(allTopicsInContext).forEach(e -> eventClientMap.get(e).add(sseClient));
  }

  public  EventSubscriptionManager(
      final ChainDataProvider provider,
      final JsonProvider jsonProvider,
      final EventChannels eventChannels);

}