observationsLock.writeLock().lock();
ObservableWebservice webservice = this.observations.remove(remoteEndpoint, token);
if(webservice != null){
log.info("Stopped observation of \"{}\" (remote endpoint: {}, token: {}) due to: {}",
new Object[]{webservice.getUriPath(), remoteEndpoint, token, event});
webservice.handleMessageTransferEvent(event);
}
}
finally {
observationsLock.writeLock().unlock();
}