public void done(T response) throws IllegalArgumentException {
  lock.lock();
  try {
    if (response != null) {
      this.response=response;
      condition.signal();
    }
 else {
      throw new IllegalArgumentException("response cannot be null");
    }
  }
  finally {
    lock.unlock();
  }
}

public void done ( T response ) throws IllegalArgumentException { lock . lock ( ) ; try { if ( response != null ) { this . response = response ; condition . signal ( ) ; } else { throw new IllegalArgumentException ( "response cannot be null" ) ; } } finally { lock . unlock ( ) ; } }
done with valid response and notify that response already received .
