Advertisement
duc-phan

Untitled

Nov 30th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. // Utility method that returns when this.closed is true. Throws an exception
  2.     // if the timeout is reached.
  3.     public synchronized void waitForClose(final long timeoutMillis) throws Exception {
  4.         if(!closed) {
  5.             wait(timeoutMillis);
  6.             if(!closed)
  7.                 throw new Exception("MockResponseSender could not be closed");
  8.         }
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement