code: synchronized public Object getQuitToken() {
  	logger.debug("checking if ready to quit");
  	logger.debug("eodsTotal = " + eodsTotal + "; eodsTransferred = " + eodsTransferred);
  	if (eodsTotal != UNDEFINED &&
  		eodsTransferred == eodsTotal) {
  			// ready to release the quit token. But make sure not to do it twice.
  			// This section only returns non-nul the first time it is entered.
  			Object myToken = quitToken;
  			quitToken = null;
  			return myToken;
  		} else {
  			// not ready to quit yet
  			return null;
  		}
      }
docs: release the token if and only if (all EODS have been sent, or all EODS have been
  received), and the token has not been released yet.
  So this method will return non-null only one in the instance's lifetime.