class SubscriptionManager extends AbstractVerticle implements PrivateTransactionObserver {

  public boolean unsubscribe(final UnsubscribeRequest request) {
    final Long subscriptionId = request.getSubscriptionId();
    final String connectionId = request.getConnectionId();

    LOG.debug("Unsubscribe request subscriptionId = {}", subscriptionId);

    final Subscription subscription = subscriptions.get(subscriptionId);
    if (subscription == null || !subscription.getConnectionId().equals(connectionId)) {
      throw new SubscriptionNotFoundException(subscriptionId);
    }

    destroySubscription(subscriptionId);

    return true;
  }

  public  SubscriptionManager(
      final MetricsSystem metricsSystem, final Blockchain blockchainQueries);
  public  SubscriptionManager(final MetricsSystem metricsSystem);

}