Fire the listeners associated with the specified probe identifier.

@param probeId the probe identifier
@param instance the object instance that's the source of the probe
@param payload the probe payload
559289
final void fireProbe(long probeId, @Sensitive Object instance, @Sensitive Object target, @Sensitive Object payload) {
        try {
            //new Exception().printStackTrace();
            ProbeImpl probe = activeProbesById.get(probeId);
            ConcurrentMap<ProbeImpl, Set<ProbeListener>> listenersByProbe = this.listenersByProbe;
            if (shuttingDown || listenersByProbe == null || probe == null) {
                return;
            }
            Set<ProbeListener> listeners = listenersByProbe.get(probe);
            if (listeners == null) {
                return;
            }
            for (ProbeListener listener : listeners) {
                try {
                    Method method = listener.getTargetMethod();
                    //Class<?>[] parameterTypes = method.getParameterTypes();
                    Class<?>[] parameterTypes = listener.getParameterTypes();
                    //Annotation[][] parameterAnnotations = method.getParameterAnnotations();
                    //Annotation[][] parameterAnnotations = listener.getparameterannotations();//Performance Improvement
                    Object[] args = listener.getdefaultvalues();
                    if (args != null)
                        args = Arrays.copyOf(args, args.length);
                    boolean validated = listener.isValidated();
                    ArrayList<Integer> annList = listener.getAnnotationsList();
                    for (int i = 0; i < parameterTypes.length; i++) {

                        switch (annList.get(i)) {
                            case MonitorConstants.This:
                                if (validated || parameterTypes[i].isInstance(instance)) {
                                    args[i] = instance;
                                }
                                break;
                            case MonitorConstants.Args:
                                if (validated || Object[].class.isInstance(payload)) {
                                    args[i] = payload;
                                }
                                break;
                            case MonitorConstants.Elapsed:
                                break;
                            case MonitorConstants.Returned:
                                if (validated || parameterTypes[i].isInstance(payload)) {
                                    args[i] = payload;
                                }
                                break;
                            case MonitorConstants.FieldValue:
                                if (parameterTypes[i].isInstance(payload)) {
                                    args[i] = payload;
                                }
                                break;
                            case MonitorConstants.TargetInstance:
                                if (parameterTypes[i].isInstance(target)) {
                                    args[i] = target;
                                }
                                break;
                            case MonitorConstants.TargetMember:
                                break;
                            case MonitorConstants.Thrown:
                                if (Throwable.class.isInstance(payload) && parameterTypes[i].isInstance(payload)) {
                                    args[i] = payload;
                                }
                                break;
                            case MonitorConstants.Arg:
                                break;
                            default:
                                break;
                        }
//Below code causes performance overhead ..specifically the instanceof tag is causing overhead hence using switch case which is based on
//                        structures built the ProbeListener constructor
//                        Annotation[] annotations = parameterAnnotations[i];
//                        for (Annotation a : annotations) {
//                            if (a instanceof This) {
//                                if (parameterTypes[i].isInstance(instance)) {
//                                    System.out.println("i is " + i + " ins is This");
//                                    args[i] = instance;
//                                }
//                            } else if (a instanceof Args) { // @Args
//                                // payload instance of Object[] and Object[] can be assigned to parameter
//                                if (Object[].class.isInstance(payload) && parameterTypes[i].isAssignableFrom(Object[].class)) {
//                                    args[i] = payload;
//                                }
//                            }
//                            else if (a instanceof Elapsed) {
//                                // TODO
//                                System.out.println("elapsed");
//                                //args[i] = getDefaultValue(parameterTypes[i]);
//                            } else if (a instanceof Returned) {
//                                System.out.println("Returned");
//                                if (parameterTypes[i].isInstance(payload)) {
//                                    args[i] = payload;
//                                }
//                            } else if (a instanceof FieldValue) {
//                                System.out.println("FieldValue");
//                                if (parameterTypes[i].isInstance(payload)) {
//                                    args[i] = payload;
//                                }
//                            } else if (a instanceof TargetInstance) {
//                                System.out.println("TargetInstance");
//                                if (parameterTypes[i].isInstance(target)) {
//                                    args[i] = target;
//                                }
//                            } else if (a instanceof TargetMember) {
//                                System.out.println("TargetInstance");
//                                // TODO
//                                // args[i] = getDefaultValue(parameterTypes[i]);
//                            } else if (a instanceof Thrown) {
//                                System.out.println("Thrown");
//                                if (Throwable.class.isInstance(payload) && parameterTypes[i].isInstance(payload)) {
//                                    args[i] = payload;
//                                }
//                            } else if (a instanceof Arg) { // @Arg(n)
//                                System.out.println("Arg");
//                                Arg arg = (Arg) a;
//                                int index = arg.value() - 1;
//                                Object[] params = null;
//                                if (Object[].class.isInstance(payload)) {
//                                    params = (Object[]) payload;
//                                    if (params.length >= index && parameterTypes[i].isInstance(params[index])) {
//                                        args[i] = params[index];
//                                    }
//                                }
//                            }
//                        }
//                    }
                    }
                    listener.setValidated(true);
                    method.invoke(listener.getProbeTarget(), args);
                } catch (Throwable t) {
                    if (tc.isDebugEnabled()) {
                        Tr.debug(tc, t.getMessage());
                    }
                }
            }
        } catch (Throwable t) {
            Tr.error(tc, "PMI9999E", t.toString());
        }
    }
914824
public void fireEventListeners(EntityMetadata metadata, Object entity, Class<?> event)
    {

        // handle external listeners first
        List<? extends CallbackMethod> callBackMethods = metadata.getCallbackMethods(event);

        if (null != callBackMethods && !callBackMethods.isEmpty() && null != entity)
        {
            log.debug("Callback >> " + event.getSimpleName() + " on " + metadata.getEntityClazz().getName());
            for (CallbackMethod callback : callBackMethods)
            {
                log.debug("Firing >> " + callback);

                callback.invoke(entity);

            }
        }
    }
718224
def _fire_ipopo_event(self, kind, factory_name, instance_name=None):
        # type: (int, str, Optional[str]) -> None
        
        with self.__listeners_lock:
            # Use a copy of the list of listeners
            listeners = self.__listeners[:]

        for listener in listeners:
            try:
                listener.handle_ipopo_event(
                    constants.IPopoEvent(kind, factory_name, instance_name)
                )
            except:
                _logger.exception("Error calling an iPOPO event handler")
553537
synchronized void deactivateProbe(ProbeImpl probe) {
        listenersByProbe.remove(probe);
        activeProbesById.remove(probe.getIdentifier());

        Class<?> clazz = probe.getSourceClass();
        Map<String, ProbeImpl> classProbesByKey = probesByKey.get(clazz);
        classProbesByKey.remove(probe.getName());
        if (classProbesByKey.isEmpty()) {
            probesByKey.remove(clazz);
        }
    }
591534
private void fireOnConsumeBasic(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onConsumeBasic(e);
        }
    }
469028
void fireOnOpen(ConnectionEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ConnectionListener amqpListener = (ConnectionListener)listener;
            amqpListener.onConnectionOpen(e);
        }
    }
362538
synchronized void removeInterestedByClass(Class<?> clazz, ProbeListener listener) {
        Set<ProbeListener> listeners = listenersByClass.get(clazz);
        if (listeners != null) {
            listeners.remove(listener);
            if (listeners.isEmpty()) {
                listenersByClass.remove(clazz);
            }
        }
    }
1134905
@Override
    protected void onMethodEntry() {
        if (enabledListeners.isEmpty())
            return;

        String probeKey = createKey();
        ProbeImpl probe = getProbe(probeKey);
        long probeId = probe.getIdentifier();

        setProbeInProgress(true);
        visitLdcInsn(Long.valueOf(probeId)); // long1 long2
        if (isStatic() || isConstructor()) {
            visitInsn(ACONST_NULL); // long1 long2 this
        } else {
            visitVarInsn(ALOAD, 0); // long1 long2 this
        }
        visitInsn(ACONST_NULL); // long1 long2 this that
        createParameterArray(); // long1 long2 this that args
        visitFireProbeInvocation();
        setProbeInProgress(false);

        setProbeListeners(probe, enabledListeners);
    }
892515
protected void onServiceInstanceChanged(ServiceInstance instance){
        String serviceName = instance.getServiceName();
        List<NotificationHandler> handlerList = new ArrayList<NotificationHandler>();
        synchronized (notificationHandlers) {
            if (notificationHandlers.containsKey(serviceName)) {
                handlerList.addAll(notificationHandlers.get(serviceName));
            }
        }
        for (NotificationHandler h : handlerList) {
            h.serviceInstanceChange(instance);
        }
    }
810522
private void fireOnMessage(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onMessage(e);
        }
    }
776213
public synchronized void fireVolumeChangeEvent(Object source, int volume) {
        VolumeChangeEvent vce = new VolumeChangeEvent(source, volume);

        for (VolumeChangeListener vcl : volListeners) {
            vcl.volumeChanged(vce);
        }
    }
826462
public void fireQueryChanged(String newgroup, String newquery, String newid) {
		for (SavedQueriesPanelListener listener : listeners) {
			listener.selectedQueryChanged(newgroup, newquery, newid);
		}
	}
1034420
public static void processAllEntryProbeExtensions(Event event, RequestContext requestContext) {
		if (event == requestContext.getRootEvent()) {
			// Add the request to Active Request list
			requestContext.setRequestContextIndex(activeRequests.add(requestContext)); 
		}

		List<ProbeExtension> probeExtnList = RequestProbeService.getProbeExtensions();
		for (int i = 0; i < probeExtnList.size(); i ++) {
			ProbeExtension probeExtension = probeExtnList.get(i);
			try{
				// Entry enabled??
				if (probeExtension.invokeForEventEntry()) { 
					// To be sampled ??
					if (requestContext.getRequestId().getSequenceNumber() % probeExtension.getRequestSampleRate() == 0) { 
						if (event == requestContext.getRootEvent() && probeExtension.invokeForRootEventsOnly() == true
								&& (probeExtension.invokeForEventTypes() == null || probeExtension.invokeForEventTypes().contains(event.getType()))) {
							probeExtension.processEntryEvent(event, requestContext);
						}
						if (probeExtension.invokeForRootEventsOnly() == false
								&& (probeExtension.invokeForEventTypes() == null || probeExtension.invokeForEventTypes().contains(event.getType()))) {
							probeExtension.processEntryEvent(event, requestContext);
						}
					}
				}
			}catch(Exception e){
				if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){
					Tr.debug(tc, "----------------Probe extension invocation failure---------------");
					Tr.debug(tc, probeExtension.getClass().getName() + ".processEntryEvent failed because of the following reason:" );
					Tr.debug(tc, e.getMessage());
				}
				FFDCFilter.processException(e, RequestProbeService.class.getName() + ".processAllEntryProbeExtensions", "148");
			}
		}
	}
878840
public <T> void addListener(final Listener<T> listener, final Object instance) {
		final ListenerInstancePair<T> pair = new ListenerInstancePair<T>(listener, instance);
		this.listeners.add(pair);
		final Type observableType = GenericsUtil.getEntityGenericType(listener.getClass(), 0, Listener.class);
		final Class<?> observable = GenericsUtil.guessClazz(observableType);
		if (!this.cachedListeners.containsKey(observable)) {
			this.cachedListeners.put(observable, new LinkedList<ListenerInstancePair<?>>());
		}
		for (final Map.Entry<Class<?>, List<ListenerInstancePair<?>>> entry : this.cachedListeners.entrySet()) {
			final Class<?> type = entry.getKey();
			if (observable.isAssignableFrom(type)) {
				entry.getValue().add(pair);
			}
		}
	}
410448
function Probe(connection, done) {
  if (!(this instanceof Probe)) {
    return new Probe(connection, done);
  }

  if (typeof connection === 'string') {
    connection = Connection.from(
      Deployment.getId(connection));
  }
  debug('connection is `%j`', connection);

  this.deployment = new Deployment({
    _id: Instance.getId(connection.getId()),
    name: connection.name
  });

  this.connection = connection;

  this.db = null;
  this.metadata = null;

  if (typeof done === 'function') {
    this.exec(done);
  }
}
797953
private void fireOnRejectBasic(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onRejectBasic(e);
        }
    }
1356547
public void fireBeforeDynamicTaskAdded(String caseId, CaseFileInstance caseFile, long processInstanceId, String nodeType, Map<String, Object> parameters) {
        final Iterator<CaseEventListener> iter = getEventListenersIterator();

        if (iter.hasNext()) {
            final CaseDynamicTaskEvent event = new CaseDynamicTaskEvent(identityProvider.getName(), caseId, caseFile, nodeType, parameters, processInstanceId);

            do {
                iter.next().beforeDynamicTaskAdded(event);
            } while (iter.hasNext());
        }        
    }