code: private void waitForCallback(final String uuid, final long timeout) throws TimeoutException {
  
  		synchronized (lock) {
  
  			this.message = null;
  			this.hasTimeout = true;
  
  			try {
  				lock.wait(timeout);
  
  			} catch (InterruptedException iex) {
  				logger.warn("", iex);
  			}
  
  			// remove timed out callback
  			if (this.hasTimeout) {
  
  				peer.unregisterCallback(uuid);
  				throw new TimeoutException();
  			}
  		}
  	}
docs: ----- private methods -----