docs: function (
      session, handler, subscriptionId, params, name) {
    var self = this;
    self._session = session; // type is Session
    self.connection = session.connectionHandle; // public API object
  
    self._handler = handler;
  
    // my subscription ID (generated by client, undefined for universal subs).
    self._subscriptionId = subscriptionId;
    // undefined for universal subs
    self._name = name;
  
    self._params = params || [];
  
    // Only named subscriptions have IDs, but we need some sort of string
    // internally to keep track of all subscriptions inside
    // SessionDocumentViews. We use this subscriptionHandle for that.
    if (self._subscriptionId) {
      self._subscriptionHandle = 'N' + self._subscriptionId;
    } else {
      self._subscriptionHandle = 'U' + Random.id();
    }
  
    // has _deactivate been called?
    self._deactivated = false;
  
    // stop callbacks to g/c this sub.  called w/ zero arguments.
    self._stopCallbacks = [];
  
    // the set of (collection, documentid) that this subscription has
    // an opinion about
    self._documents = {};
  
    // remember if we are ready.
    self._ready = false;
  
    // Part of the public API: the user of this sub.
    self.userId = session.userId;
  
    // For now, the id filter is going to default to
    // the to/from DDP methods on LocalCollection, to
    // specifically deal with mongo/minimongo ObjectIds.
  
    // Later, you will be able to make this be "raw"
    // if you want to publish a collection that you know
    // just has strings for keys and no funny business, to
    // a ddp consumer that isn't minimongo
  
    self._idFilter = {
      idStringify: LocalCollection._idStringify,
      idParse: LocalCollection._idParse
    };
  
    Package.facts && Package.facts.Facts.incrementServerFact(
      "livedata", "subscriptions", 1);
  }