void removeObservers(int cause, Object privateData, int xrefID) {
		if ((xrefID != 0) && (this.monitorCrossRefID == xrefID)) {
			this.provider.deleteMonitor(this.monitorCrossRefID);
			this.monitorCrossRefID = 0;
		}

		CallbackAndType cbAndType = null;
		synchronized (this.callbackAndTypeVector) {
			try {
				for (int i = 0; i < this.callbackAndTypeVector.size(); i++) {
					cbAndType = (CallbackAndType) this.callbackAndTypeVector
							.elementAt(i);
					if (cbAndType.devWithType == null) {
						synchronized (this.monitorThreads) {
							if (!this.monitorThreads
									.contains(cbAndType.callback)) {
								this.monitorThreads
										.addElement(cbAndType.callback);
								cbAndType.callback.addReference();
							}
						}
					} else {
						boolean found = false;
						DeviceObs devObs = null;
						synchronized (this.deviceObsVector) {
							for (int j = 0; j < this.deviceObsVector.size(); j++) {
								devObs = (DeviceObs) this.deviceObsVector
										.elementAt(j);
								if (devObs.callback == cbAndType.callback) {
									found = true;
									break;
								}
							}
							if (!found) {
								devObs = new DeviceObs(cbAndType.callback);
								devObs.devWithTypeVector
										.addElement(cbAndType.devWithType);
								this.deviceObsVector.addElement(devObs);
								cbAndType.callback.addReference();
							}
						}

					}

				}

			} finally {
				this.callbackAndTypeVector.removeAllElements();
			}
		}

		Vector<?> observers = getCallObservers();
		for (int i = 0; i < observers.size(); i++) {
			removeCallMonitor((TsapiCallMonitor) observers.elementAt(i), cause,
					privateData);
		}

		if (this.monitorCrossRefID != 0) {
			this.provider.deleteMonitor(this.monitorCrossRefID);
			if (this.provider.getCapabilities().getMonitorStop() != 0) {
				try {
					this.provider.tsapi.monitorStop(this.monitorCrossRefID,
							null, null);
				} catch (TsapiUnableToSendException tue) {
					throw tue;
				} catch (Exception e) {
					log.error(e.getMessage(), e);
				}

			}

			this.monitorCrossRefID = 0;

			if (!checkForMonitors()) {
				setNeedSnapshot(true);
			}
		}
	}