/*
Adds a list of Session Listeners
For shared session context or global sesions, we call
this method to add each app's listeners.
966064
public void addHttpSessionListener(ArrayList al, String j2eeName) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[ADD_HTTP_SESSION_LISTENER], "addHttpSessionListener:" + al);
        }
        if (j2eeName != null) {
            addToJ2eeNameList(j2eeName, al.size(), mHttpSessionListenersJ2eeNames);
        }
        synchronized (mHttpSessionListeners) {
            mHttpSessionListeners.addAll(al);
            if (mHttpSessionListeners.size() > 0) {
                sessionListener = true;
                _coreHttpSessionManager.getIStore().setHttpSessionListener(true);
                boolean mIBMSessionListenerImplemented = isIBMSessionListenerImplemented(al); // PQ81248
                if (mIBMSessionListenerImplemented) {
                    wasHttpSessionObserver.setDoesContainIBMSessionListener(true);
                }
            }
        }

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ADD_HTTP_SESSION_LISTENER], "addHttpSessionListener:" + al);
        }
    }
24381
private void addListeners() {
	    this.min.xProperty().addListener((observable, oldValue, nValue) -> {
            final int currentMin = nValue.intValue();
            final int currentMax = getMaxX();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                maxXProperty().set(currentMin);
            }
        });
        this.min.yProperty().addListener((observable, oValue, nValue) -> {
            final int currentMin = nValue.intValue();
            final int currentMax = getMaxY();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                maxYProperty().set(currentMin);
            }
        });
        this.min.zProperty().addListener((observable, oValue, nValue) -> {
            final int currentMin = nValue.intValue();
            final int currentMax = getMaxZ();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                maxZProperty().set(currentMin);
            }
        });
        this.max.xProperty().addListener((observable, oValue, nValue) -> {
            final int currentMax = nValue.intValue();
            final int currentMin = getMinX();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                minXProperty().set(currentMax);
            }
        });
        this.max.yProperty().addListener((observable, oValue, nValue) -> {
            final int currentMax = nValue.intValue();
            final int currentMin = getMinY();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                minYProperty().set(currentMax);
            }
        });
        this.max.zProperty().addListener((observable, oValue, nValue) -> {
            final int currentMax = nValue.intValue();
            final int currentMin = getMinZ();
            if (currentMax < currentMin) {
                // min-max constrain is broken
                minZProperty().set(currentMax);
            }
        });
    }
1067774
public void addListeners()
    {
        if (ScreenConstants.HTML_SCREEN_TYPE.equalsIgnoreCase(this.getViewFactory().getViewSubpackage()))
            if (this.getProperty(EDIT_PARAM) == null)
                this.setEditing(false);     // For HTML default is no editing (specify explicitly by edit=true)
        super.addListeners();
    }
56930
public void addListeners()
    {
        super.addListeners();
        
            // Link the screen field to the passed in record
        ((ReferenceField)this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID)).syncReference(this.getHeaderRecord());
        this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(Resource.DESCRIPTION, this.getScreenRecord().getField(ClassInfoScreenRecord.NAME)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.NAME).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(Resource.LOCATION, this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE).addListener(new FieldReSelectHandler(this));
    }
910413
public void addListeners()
    {
        super.addListeners();
        this.setEditing(true);
        Record screenRecord = this.getScreenRecord();
        ReferenceField fldMessageInfoType = (ReferenceField)screenRecord.getField(MessageLogScreenRecord.MESSAGE_INFO_TYPE_ID);
    }
1005611
public void addListeners()
    {
        this.getRecord(UserInfo.USER_INFO_FILE).getField(UserInfo.USER_NAME).setEnabled(false);
        this.readCurrentUser();
        
        super.addListeners();
        
        this.getMainRecord().addListener(new UserPasswordHandler(true));
    }
774048
public void addListeners()
    {
        super.addListeners();
        // This is all temporary. It will be much better to display the resources next to the EY for each record
        this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(Registration.LANGUAGE, this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE), DBConstants.EQUALS, null, false));
        this.getMainRecord().getField(Registration.LANGUAGE).addListener(new InitFieldHandler(this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE)));
        this.getScreenRecord().getField(ResourceScreenRecord.LOCALE).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(Registration.LOCALE, this.getScreenRecord().getField(ResourceScreenRecord.LOCALE), DBConstants.EQUALS, null, false));
        this.getMainRecord().getField(Registration.LOCALE).addListener(new InitFieldHandler(this.getScreenRecord().getField(ResourceScreenRecord.LOCALE)));
        
        this.getMainRecord().getField(Registration.CODE).addListener(new InitFieldHandler(this.getHeaderRecord().getField(Resource.CODE)));
    }
945823
function addListeners() {
	if (listenersAdded) return;
	listenersAdded = true;

	if (cluster.isMaster) {
		// Listen for worker responses to requests for local metrics
		cluster.on('message', (worker, message) => {
			if (message.type === GET_METRICS_RES) {
				const request = requests.get(message.requestId);
				message.metrics.forEach(registry => request.responses.push(registry));
				request.pending--;

				if (request.pending === 0) {
					// finalize
					requests.delete(message.requestId);
					clearTimeout(request.errorTimeout);

					if (request.failed) return; // Callback already run with Error.

					const registry = AggregatorRegistry.aggregate(request.responses);
					const promString = registry.metrics();
					request.done(null, promString);
				}
			}
		});
	}
}
639590
public void addListener(final WebAppListener listener) {
		NullArgumentException.validateNotNull(listener, "Listener");
		NullArgumentException.validateNotNull(listener.getListenerClass(),
				"Listener class");
		if (!listeners.contains(listener)) {
			listeners.add(listener);
		}
	}
87365
public synchronized void addJingleSessionRequestListener(final JingleSessionRequestListener jingleSessionRequestListener) {
        if (jingleSessionRequestListener != null) {
            if (jingleSessionRequestListeners == null) {
                initJingleSessionRequestListeners();
            }
            synchronized (jingleSessionRequestListeners) {
                jingleSessionRequestListeners.add(jingleSessionRequestListener);
            }
        }
    }
1048979
public void addHttpSession(final HttpSession session) {
		if (View.isInitialised() && !EventQueue.isDispatchThread()) {
			EventQueue.invokeLater(new Runnable() {

				@Override
				public void run() {
					addHttpSession(session);
				}
			});

			return;
		}

		if (sessions.contains(session))
			return;
		sessions.add(session);
		final int affectedRow = sessions.size() - 1;
		fireTableRowsInserted(affectedRow, affectedRow);
	}
599139
@SuppressWarnings("unchecked")
	public void addBeanContextServicesListener(BeanContextServicesListener listener)
	{
		if (listener == null)
		{
			throw new NullPointerException();
		}
		synchronized (bcsListeners)
		{
			bcsListeners.add(listener);
		}
	}
607718
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().setKeyArea(CalendarEntry.START_DATE_TIME_KEY);
        BaseField fieldTrue = new BooleanField(null, "FalseField", DBConstants.DEFAULT_FIELD_LENGTH, "FalseField", null);
        fieldTrue.setState(true);
        this.getMainRecord().addListener(new FreeOnFreeHandler(fieldTrue));
        //+this.getMainRecord().addListener(new CompareFileFilter(CalendarEntry.HIDDEN, fieldTrue, "<>", null, true));
        this.setEditing(true);
    }
1261230
private void initListeners() {
        listViewProperty().addListener((listObj, oldList, newList) -> {
            if (newList != null) {
                if (getListView() instanceof JFXListView) {
                    ((JFXListView<?>) newList).currentVerticalGapProperty().addListener((o, oldVal, newVal) -> {
                        cellRippler.rippler.setClip(null);
                        if (newVal.doubleValue() != 0) {
                            playExpandAnimation = true;
                            getListView().requestLayout();
                        } else {
                            // fake expand state
                            double gap = clip.getY() * 2;
                            gapAnimation = new Timeline(
                                new KeyFrame(Duration.millis(240),
                                    new KeyValue(this.translateYProperty(),
                                        -gap / 2 - (gap * (getIndex())),
                                        Interpolator.EASE_BOTH)
                                ));
                            gapAnimation.play();
                            gapAnimation.setOnFinished((finish) -> {
                                requestLayout();
                                Platform.runLater(() -> getListView().requestLayout());
                            });
                        }
                    });

                    selectedProperty().addListener((o, oldVal, newVal) -> {
                        if (newVal) {
                            selectionChanged = true;
                        }
                    });
                }
788937
public void addComponentListeners() {
        // avoid duplicate registration
        removeListeners();

        for (final AbstractField<?> field : allComponents) {
            if (field instanceof TextChangeNotifier) {
                ((TextChangeNotifier) field).addTextChangeListener(new ChangeListener(field));
            }

            if (field instanceof Table) {
                ((Table) field).addItemSetChangeListener(new ChangeListener(field));
            }
            field.addValueChangeListener(new ChangeListener(field));
        }
    }
130490
public void addListeners()
    {
        super.addListeners();
        if (m_properties.size() > 0)
        {
            Record recPropertiesInput = this.getMainRecord();
            recPropertiesInput.setKeyArea(PropertiesInput.KEY_KEY);
            Iterator<Object> iterator = m_properties.keySet().iterator();
            while (iterator.hasNext())
            {
                String strKey = (String)iterator.next();
                try {
                    recPropertiesInput.addNew();
                    recPropertiesInput.getField(PropertiesInput.KEY).setString(strKey);
                    if (!recPropertiesInput.seek(null))
                    {
                        recPropertiesInput.addNew();
                        recPropertiesInput.getField(PropertiesInput.KEY).setString(strKey);
                        recPropertiesInput.add();
                    }
                } catch (DBException ex) {
                    ex.printStackTrace();
                }
            }
            //?this.getMainRecord().getField(PropertiesInput.KEY).setEnabled(false);
        }
    }
1072100
public void addConnectionListener(KNXListener l)
	{
		if (l == null)
			return;
		synchronized (listeners) {
			if (!listeners.contains(l)) {
				listeners.add(l);
				listenersCopy = new ArrayList(listeners);
			}
			else
				logger.warn("event listener already registered");
		}
	}