/** * Updates information in BulkResponse in the case of asynchronous connection. If connection is * asynchronous, the response should be sent with status = STATUS_UNAVAILABLE. The provider calls * the update method to store the information, reset the status, and notify() the thread in case a * client has called a method resulting in a wait() until the information is available. */ public void updateResponse(BulkResponse update) throws JAXRException { synchronized (this) { // set content and status setPartialResponse(update.isPartialResponse()); collection = new ArrayList(update.getCollection()); if (update.getExceptions() != null) { exceptions = new ArrayList(update.getExceptions()); } setStatus(update.getStatus()); // wake up thread if waiting this.notify(); } }