Notify the given child that a service has been revoked.
341614
private void notifyServiceRevokedToServiceUsers(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow,
			BCSSChild bcssChild)
	{
		if (bcssChild.serviceRecords == null || bcssChild.serviceRecords.isEmpty())
		{
			return;
		}
		synchronized (bcssChild.child)
		{
			for (Iterator it = bcssChild.serviceRecords.iterator(); it.hasNext();)
			{
				ServiceRecord rec = (ServiceRecord) it.next();
				if (rec.serviceClass == serviceClass && rec.provider == serviceProvider && rec.revokedListener != null && !rec.isDelegate)
				{
					rec.revokedListener
							.serviceRevoked(new BeanContextServiceRevokedEvent(getBeanContextServicesPeer(), serviceClass, revokeCurrentServicesNow));
					// prevent duplicate notification
					rec.revokedListener = null;
				}
			}
		}
	}
558369
def _handle_cancel_notification(self, msg_id):
        """"""
        request_future = self._client_request_futures.pop(msg_id, None)

        if not request_future:
            log.warn("Received cancel notification for unknown message id %s", msg_id)
            return

        # Will only work if the request hasn't started executing
        if request_future.cancel():
            log.debug("Cancelled request with id %s", msg_id)
6912
def _notify(self, data):
        """"""
        payload = tlv.decode(
            payload=data.get('payload'),
            content_type=data.get('ct'),
            decode_b64=True
        )
        super(CurrentResourceValue, self)._notify(payload)
        # after one response, close the channel
        self.ensure_stopped()
326352
public final void fail () {
		Status previousStatus = status;
		status = Status.FAILED;
		if (tree.listeners != null && tree.listeners.size > 0) tree.notifyStatusUpdated(this, previousStatus);
		end();
		if (control != null) control.childFail(this);
	}
722550
def is_ceil_reached(self, service):
        
        failed = service.provider_failed + 1
        if failed > settings.DJANGO_TH.get('failed_tries', 10):
            TriggerService.objects.filter(id=service.id).update(date_result=now(), status=False)
        else:
            TriggerService.objects.filter(id=service.id).update(date_result=now(), provider_failed=failed)

        warn_user_and_admin('provider', service)
208731
def handleNotification(self, req):
        """"""
        name = req["method"]
        params = req["params"]
        try: #to get a callable obj 
            obj = getMethodByName(self.service, name)
            rslt = obj(*params)
        except:
            pass
730024
def start_notify!(service, characteristic)
      char= _find_characteristic(service, characteristic)
      if char.flag?('notify')
        char.notify!
      else
        raise OperationNotSupportedError.new("No notifications available for characteristic #{characteristic}")
      end
    end
521867
public void notifyParent(String eventName, Object eventData, boolean recurse) {
        ElementBase ele = parent;
        
        while (ele != null) {
            recurse &= ele.parentListeners.notify(this, eventName, eventData);
            ele = recurse ? ele.parent : null;
        }
    }
184250
def notify_done(self, error=False, run_done_callbacks=True):
        ''' 
        '''
        if error:
            for _session in self._sessions.values():
                _session.set_done()
            self._session_count = 0
        else:
            self._update_session_count(-1)
            for _session in self._sessions.values():
                if not _session.is_done():
                    return

        if run_done_callbacks:
            self._run_done_callbacks()
        self._done_event.set()
1028271
public void onRemoveChildResource(final ModelNode address, final ModelNode selection) {
        final ModelNode fqAddress = AddressUtils.toFqAddress(address, selection.asString());

        _loadMetaData(fqAddress, new ResourceData(true), new Outcome<ResourceData>() {
                    @Override
                    public void onFailure(ResourceData context) {
                        Console.error("Failed to load metadata for " + address.asString());
                    }

                    @Override
                    public void onSuccess(ResourceData context) {
                        String resourceAddress = AddressUtils.asKey(fqAddress, true);
                        if (context.securityContext.getWritePrivilege(resourceAddress).isGranted()) {
                            _onRemoveChildResource(address, selection);
                        } else {
                            Feedback.alert(Console.CONSTANTS.unauthorized(), Console.CONSTANTS.unauthorizedRemove());
                        }
                    }
                }
        );

    }
557914
def remove_child(self, router):
        ''''''
        if router in self.routes:
            self.routes.remove(router)
            router._parent = None
796512
private boolean notifyOnRestoreDefaultValuesRequested() {
        boolean result = true;

        for (RestoreDefaultsListener listener : restoreDefaultsListeners) {
            result &= listener.onRestoreDefaultValuesRequested(this);
        }

        return result;
    }
114328
def remove_from_parent(self):
        """"""
        parent = self.parent
        if parent is not None:
            try:
                children = parent.children
            except AttributeError: pass
            else:
                remove_upto_once(children, self)
190197
function onPeerFailed(peer)
    {
        scope._servConn.sendRTCState(false,peer.id);
        scope.dispatchEvent("peerFailed",peer.id);
    }
1110284
def on_aborted(self):
        

        print('Authentication aborted')

        # Authentication aborted
        self.is_authenticating.acquire()
        self.is_authenticating.notify_all()
        self.is_authenticating.release()
18578
def stop(self):
        """"""
        if hasattr(self, 'process'):
            if self.process is not None:
                try:
                    is_running = self.process.poll() is None
                except AttributeError:
                    is_running = False

                if is_running:
                    self.bundle_engine.logline("Stopping {0}".format(self.service.name))
                    self.term_signal_sent = True

                    # Politely ask all child processes to die first
                    try:
                        for childproc in psutil.Process(self.process.pid).children(recursive=True):
                            childproc.send_signal(signal.SIGINT)
                    except psutil.NoSuchProcess:
                        pass
                    except AttributeError:
                        pass

                    try:
                        self.process.send_signal(self.service.stop_signal)
                    except OSError as e:
                        if e.errno == 3:        # No such process
                            pass
                else:
                    self.bundle_engine.warnline("{0} stopped prematurely.".format(self.service.name))
            else:
                self.bundle_engine.warnline("{0} stopped prematurely.".format(self.service.name))
        else:
            self.bundle_engine.warnline("{0} was never successfully started.".format(self.service.name))
373440
def purge_service_by_key(self, service_id, key):
		""""""
		content = self._fetch("/service/%s/purge/%s" % (service_id, key), method="POST")
		return self._status(content)