Finds connection lost type notifications.
@param connectionNotification
@return
4002
private boolean connectionLost(JMXConnectionNotification connectionNotification) {
        return connectionNotification.getType().equals(JMXConnectionNotification.NOTIFS_LOST)
                || connectionNotification.getType().equals(JMXConnectionNotification.CLOSED)
                || connectionNotification.getType().equals(JMXConnectionNotification.FAILED);
    }
1192105
void notifyObservers(ApptentiveNotification notification) {
		boolean hasLostReferences = false;

		// create a temporary list of observers to avoid concurrent modification errors
		List<ApptentiveNotificationObserver> temp = new ArrayList<>(observers.size());
		for (int i = 0; i < observers.size(); ++i) {
			ApptentiveNotificationObserver observer = observers.get(i);
			ObserverWeakReference observerRef = ObjectUtils.as(observer, ObserverWeakReference.class);
			if (observerRef == null || !observerRef.isReferenceLost()) {
				temp.add(observer);
			} else {
				hasLostReferences = true;
			}
		}

		// notify observers
		for (int i = 0; i < temp.size(); ++i) {
			try {
				temp.get(i).onReceiveNotification(notification);
			} catch (Exception e) {
				ApptentiveLog.e(e, "Exception while posting notification: %s", notification);
				logException(e); // TODO: add more context info
			}
		}

		// clean lost references
		if (hasLostReferences) {
			for (int i = observers.size() - 1; i >= 0; --i) {
				final ObserverWeakReference observerRef = ObjectUtils.as(observers.get(i), ObserverWeakReference.class);
				if (observerRef != null && observerRef.isReferenceLost()) {
					observers.remove(i);
				}
			}
		}
	}
33648
@Override
	public void connectionRecovered(IManagedConnectionEvent<C> event) {
		// physical connection is already set free
		if (!event.getManagedConnection().hasCoreConnection()) {
			return;
		}
		IPhynixxConnection con = event.getManagedConnection()
				.getCoreConnection();
		if (con == null || !(con instanceof IXADataRecorderAware)) {
			return;
		}

		IXADataRecorderAware messageAwareConnection = (IXADataRecorderAware) con;

		// Transaction is close and the logger is destroyed ...
		IXADataRecorder xaDataRecorder = messageAwareConnection
				.getXADataRecorder();
		if (xaDataRecorder == null) {
			return;
		}
		// it's my logger ....

		// the logger has to be destroyed ...
		else {
			xaDataRecorder.destroy();
			messageAwareConnection.setXADataRecorder(null);
		}

	}
30937
def list_types(self):
        
        uri = "/notification_types"
        resp, resp_body = self.api.method_get(uri)
        return [CloudMonitorNotificationType(self, info)
                for info in resp_body["values"]]
885943
public List<Connection> getDefaultOutgoingConnections() {
        return getOutgoingConnections(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
    }
292703
public List<Notification> getBySource(Object source) {
        List<Notification> found = new ArrayList<Notification>();
        for (Notification n: NotificationManager.notifications)
            if (n.getSource().equals(source)) {
                logger.fine("...found a match for getBySource query. With source: "+source);
                found.add(n);
            }
        if(found.size()>0)        
            return found;
        return null;
    }
1071751
void messagingEngineTerminated(
            final SibRaMessagingEngineConnection connection) {

        final String methodName = "messagingEngineTerminated";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, connection);
        }

        /*
         * Close the connection - any future work will attempt to create a new
         * connection
         */

        closeConnection(connection.getConnection().getMeUuid(), true);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
46273
private void onConnectionClosed()
   {
      ConnectionEvent evt = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
      for (ConnectionEventListener listener : listeners)
      {
         try
         {
            listener.connectionClosed(evt);
         }
         catch (Exception e1)
         {
            LOG.warn("An error occurs while notifying the listener " + listener, e1);
         }
      }
   }
1322255
public PushedNotifications getFailedNotifications() {
		PushedNotifications filteredList = new PushedNotifications(this);
		for (PushedNotification notification : this) {
			if (!notification.isSuccessful()) {
				filteredList.add(notification);
			}
		}
		return filteredList;
	}
138270
synchronized void connectionFailed(Throwable t) {
        if (!isConnected()) {
            //another thread already disconnected this connector, so return
            return;
        }

        if (logger.isLoggable(Level.FINER)) {
            logger.logp(Level.FINER, logger.getName(), "connectionFailed", "Connection failed: " + RESTClientMessagesUtil.getObjID(this));
        }

        disconnect();

        if (notificationRegistry != null) {
            notificationRegistry.close();
        }

        //Emit the notification
        connector.connectionFailed(t);
    }
379746
public java.util.Map<String, IdentityNotificationAttributes> getNotificationAttributes() {
        if (notificationAttributes == null) {
            notificationAttributes = new com.amazonaws.internal.SdkInternalMap<String, IdentityNotificationAttributes>();
        }
        return notificationAttributes;
    }
865137
public List<String> getScheduledNotificationMessage(ScheduledNotification notification) {
        return broker.callRPCList("RGCWXQ SCHMSG", null, notification.getIen());
    }
207988
@Override
   public List<ConnectionDefinition> getConnectionDefinitions()
   {
      if (connectionDefinitions == null)
         return null;

      return Collections.unmodifiableList(connectionDefinitions);
   }
452648
@Override
    public void handleNotification(Notification notification, Object handback) {
        String notificationType = notification.getType();
        if (notificationType.equals(JMXConnectionNotification.OPENED)) {
            managementContext.incrementManagementSessionCount();
        } else if (notificationType.equals(JMXConnectionNotification.CLOSED)) {
            managementContext.decrementManagementSessionCount();
        }
    }
1211522
public final static List<ConnectionNotation> getAllEdgeConnections(List<ConnectionNotation> connections) {
    List<ConnectionNotation> listEdgeConnection = new ArrayList<ConnectionNotation>();
    for (ConnectionNotation connection : connections) {
      if (!(connection.getrGroupSource().equals("pair"))) {
        listEdgeConnection.add(connection);
      }
    }
    return listEdgeConnection;
  }
282194
@Override
	public void onReceiveNotification(ApptentiveNotification notification) {
		checkConversationQueue();

		if (notification.hasName(NOTIFICATION_ACTIVITY_STARTED) ||
			notification.hasName(NOTIFICATION_ACTIVITY_RESUMED)) {
			final Activity activity = notification.getRequiredUserInfo(NOTIFICATION_KEY_ACTIVITY, Activity.class);
			setCurrentForegroundActivity(activity);
		} else if (notification.hasName(NOTIFICATION_APP_ENTERED_FOREGROUND)) {
			appWentToForeground();
		} else if (notification.hasName(NOTIFICATION_APP_ENTERED_BACKGROUND)) {
			setCurrentForegroundActivity(null);
			appWentToBackground();
		} else if (notification.hasName(NOTIFICATION_PAYLOAD_WILL_START_SEND)) {
			final PayloadData payload = notification.getRequiredUserInfo(NOTIFICATION_KEY_PAYLOAD, PayloadData.class);
			if (payload.getType().equals(PayloadType.message)) {
				resumeSending();
			}
		} else if (notification.hasName(NOTIFICATION_PAYLOAD_DID_FINISH_SEND)) {
			final boolean successful = notification.getRequiredUserInfo(NOTIFICATION_KEY_SUCCESSFUL, Boolean.class);
			final PayloadData payload = notification.getRequiredUserInfo(NOTIFICATION_KEY_PAYLOAD, PayloadData.class);
			final Integer responseCode = notification.getRequiredUserInfo(NOTIFICATION_KEY_RESPONSE_CODE, Integer.class);
			final JSONObject responseData = successful ? notification.getRequiredUserInfo(NOTIFICATION_KEY_RESPONSE_DATA, JSONObject.class) : null;
			if (responseCode == -1) {
				pauseSending(SEND_PAUSE_REASON_NETWORK);
			}

			if (payload.getType().equals(PayloadType.message)) {
				onSentMessage(payload.getNonce(), responseCode, responseData);
			}
		}
	}
1326377
private <T extends Rdp4jListener> void notifyListeners(Class<T> listenerType, Notifier<T> notifier)
            throws InterruptedException {
        for (Rdp4jListener listener : listeners) {
            if (isInstanceOf(listener, listenerType)) {
                /*
                 * This cast is correct, since we check if listener
                 * is instance of listenerType.
                 */
                @SuppressWarnings("unchecked")
                T listener2 = (T) listener;
                try {
                    notifier.notify(listener2);
                } catch (InterruptedException e) {
                    throw e;
                } catch (Throwable e) {
                    logErrorMessage(e);
                }
            }
        }
    }