Requests that the specified invocation notification be packaged up and sent to the supplied
target client.
327372
public static void sendNotification (
        ClientObject target, String receiverCode, int methodId, Object[] args, Transport transport)
    {
        // convert the receiver hash id into the code used on this
        // specific client
        Registration rreg = target.receivers.get(receiverCode);
        if (rreg == null) {
            log.warning("Unable to locate receiver for invocation service notification",
                        "clobj", target.who(), "code", receiverCode, "methId", methodId,
                        "args", args, new Exception());

        } else {
//             log.info("Sending notification", "target", target, "code", receiverCode,
//                      "methodId", methodId, "args", args);

            // create and dispatch an invocation notification event
            target.postEvent(new InvocationNotificationEvent(
                                 target.getOid(), rreg.receiverId, methodId, args).
                             setTransport(transport));
        }
    }
973993
@Override
    public void notifyClients()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "notifyClients");

        long totalItems = getTotalMsgCount();

        synchronized (this)
        {
            if (wlmRemoved && ((_destLowMsgs == -1) || (totalItems <= _destLowMsgs)))
            {
                wlmRemoved = false;

                // re-advertise destination PUT on WLM
                if (!destinationHandler.isTemporary())
                {
                    updatePutRegistration(true);
                    destinationHandler.requestReallocation();
                }
                // Fire event if event notification is enabled
                // Also check for logging of events (510343)
                if (_isEventNotificationEnabled ||
                    (mp.getCustomProperties().getOutputLinkThresholdEventsToLog() && destinationHandler.isLink()) ||
                    (mp.getCustomProperties().getOutputDestinationThresholdEventsToLog() && !destinationHandler.isLink()))
                {
                    fireDepthThresholdReachedEvent(getControlAdapter(),
                                                   false,
                                                   totalItems, _destLowMsgs); // Reached low
                }
            }
            else if (!wlmRemoved
                     && (_destHighMsgs != -1)
                     && (_destLowMsgs != -1)
                     && (totalItems >= _destHighMsgs))
            {
                wlmRemoved = true;

                // remove destination PUT advertisement on WLM
                if (!destinationHandler.isTemporary())
                {
                    updatePutRegistration(false);
                    wlmRemoved = true;
                }
                // Fire event if event notification is enabled
                // Also check for logging of events (510343)
                if (_isEventNotificationEnabled ||
                    (mp.getCustomProperties().getOutputLinkThresholdEventsToLog() && destinationHandler.isLink()) ||
                    (mp.getCustomProperties().getOutputDestinationThresholdEventsToLog() && !destinationHandler.isLink()))
                {
                    fireDepthThresholdReachedEvent(getControlAdapter(),
                                                   true,
                                                   totalItems, _destHighMsgs); // Reached High
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "notifyClients", new Boolean(!wlmRemoved));

    }
145915
protected void sendInBound(int taskId, HeronTuples.HeronTupleSet message) {
    if (message.hasData()) {
      sendMessageToInstance(taskId, message);
    }

    if (message.hasControl()) {
      processAcksAndFails(message.getSrcTaskId(), taskId, message.getControl());
    }
  }
1273333
def notify(contact_request)
      @contact_request = contact_request

      mail to: notification_recipients,
           from: notification_sender(contact_request),
           subject: notification_subject
    end
320318
async def send_notification(self, method, args=()):
        ''''''
        message = self.connection.send_notification(Notification(method, args))
        await self._send_message(message)
88524
def _send_mfg_inspector_request(envelope_data, credentials, destination_url):
  """"""
  logging.info('Uploading result...')
  http = httplib2.Http()

  if credentials.access_token_expired:
    credentials.refresh(http)
  credentials.authorize(http)

  resp, content = http.request(destination_url, 'POST', envelope_data)

  try:
    result = json.loads(content)
  except Exception:
    logging.debug('Upload failed with response %s: %s', resp, content)
    raise UploadFailedError(resp, content)

  if resp.status != 200:
    logging.debug('Upload failed: %s', result)
    raise UploadFailedError(result['error'], result)

  return result
896218
def notify(self, method, params=None):
        
        log.debug('Sending notification: %s %s', method, params)

        message = {
            'jsonrpc': JSONRPC_VERSION,
            'method': method,
        }
        if params is not None:
            message['params'] = params

        self._consumer(message)
609614
protected void sendNotification(ResourceDeliveryMessage theMsg) {
		Map<String, List<String>> params = new HashMap<>();
		List<Header> headers = new ArrayList<>();
		if (theMsg.getSubscription().getHeaders() != null) {
			theMsg.getSubscription().getHeaders().stream().filter(Objects::nonNull).forEach(h -> {
				final int sep = h.indexOf(':');
				if (sep > 0) {
					final String name = h.substring(0, sep);
					final String value = h.substring(sep + 1);
					if (StringUtils.isNotBlank(name)) {
						headers.add(new Header(name.trim(), value.trim()));
					}
				}
			});
		}

		StringBuilder url = new StringBuilder(theMsg.getSubscription().getEndpointUrl());
		IHttpClient client = myFhirContext.getRestfulClientFactory().getHttpClient(url, params, "", RequestTypeEnum.POST, headers);
		IHttpRequest request = client.createParamRequest(myFhirContext, params, null);
		try {
			IHttpResponse response = request.execute();
			// close connection in order to return a possible cached connection to the connection pool
			response.close();
		} catch (IOException e) {
			ourLog.error("Error trying to reach " + theMsg.getSubscription().getEndpointUrl());
			e.printStackTrace();
			throw new ResourceNotFoundException(e.getMessage());
		}
	}
618936
public void sendNotification(final Notification notification) {

    ContextAwareTimer.Context timer = this.notificationTimer.time();
    if(!this.notificationTargets.isEmpty()) {
        for (final Map.Entry<UUID, Function<Notification, Void>> entry : this.notificationTargets.entrySet()) {
          try {
            entry.getValue().apply(notification);
          } catch (RuntimeException exception) {
            LOG.warn("RuntimeException when running notification target. Skipping.", exception);
          }
        }
    }

    if(getParent().isPresent()) {
      getParent().get().sendNotification(notification);
    }
    timer.stop();
  }
997072
def send_notification(method, params)
      data = MessagePack.dump([2, method, params]).bytes
      ws.send(data)
    rescue => exc
      warn exc
      abort exc
    end
382488
public void sendNotification(NotificationType type,
                                 String subject,
                                 String message,
                                 String... destinations) {
        for (Notifier notifier : notifiers) {
            if (notifier.getNotificationType().equals(type)) {
                notifier.notify(subject, message, destinations);
            }
        }
    }
1256853
def notify_handler(verb, **kwargs):
    

    # Pull the options out of kwargs
    kwargs.pop('signal', None)
    recipient = kwargs.pop('recipient')
    actor = kwargs.pop('sender')
    optional_objs = [
        (kwargs.pop(opt, None), opt)
        for opt in ('target', 'action_object')
    ]
    public = bool(kwargs.pop('public', True))
    description = kwargs.pop('description', None)
    timestamp = kwargs.pop('timestamp', timezone.now())
    level = kwargs.pop('level', Notification.LEVELS.info)

    # Check if User or Group
    if isinstance(recipient, Group):
        recipients = recipient.user_set.all()
    elif isinstance(recipient, (QuerySet, list)):
        recipients = recipient
    else:
        recipients = [recipient]

    new_notifications = []

    for recipient in recipients:
        newnotify = Notification(
            recipient=recipient,
            actor_content_type=ContentType.objects.get_for_model(actor),
            actor_object_id=actor.pk,
            verb=text_type(verb),
            public=public,
            description=description,
            timestamp=timestamp,
            level=level,
        )

        # Set optional objects
        for obj, opt in optional_objs:
            if obj is not None:
                setattr(newnotify, '%s_object_id' % opt, obj.pk)
                setattr(newnotify, '%s_content_type' % opt,
                        ContentType.objects.get_for_model(obj))

        if kwargs and EXTRA_DATA:
            newnotify.data = kwargs

        newnotify.save()
        new_notifications.append(newnotify)

    return new_notifications
999863
function (itemPromise, previousHandle, nextHandle) {
                    this._itemsManager._versionManager.receivedNotification();
                    this._itemsManager._inserted(itemPromise, previousHandle, nextHandle);
                }
1163812
public static void sendNotification (
        ClientObject target, String receiverCode, int methodId, Object[] args)
    {
        sendNotification(target, receiverCode, methodId, args, Transport.DEFAULT);
    }
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
534364
public synchronized void sendNotification(Supplier<String> textSupplier, Supplier<U> userDataSupplier, LongSupplier timestampSupplier)
    {
        if (!map.isEmpty())
        {
            sendNotification(textSupplier.get(), userDataSupplier.get(), timestampSupplier.getAsLong());
        }
    }
666125
private void sendNotification(WingsEndpoint.ShareNotification wingsNotification) {
        // Construct pending intent. The wrapped Intent must not be null as some versions of Android require it.
        Intent intent = wingsNotification.getIntent();
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);

        // Construct notification.
        NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext);
        Notification notification = builder.setSmallIcon(R.drawable.wings__notification)
                .setContentTitle(wingsNotification.getTitle()).setContentText(wingsNotification.getMessage())
                .setTicker(wingsNotification.getTicker()).setAutoCancel(true).setWhen(System.currentTimeMillis())
                .setContentIntent(pendingIntent).build();

        // Send notification.
        NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
        if (notificationManager != null) {
            notificationManager.notify(wingsNotification.getId(), notification);
        }
    }