Register an <code>MsgListener</code> for callback.

@param listener the listener that should be called by lp_solve
@param userhandle an arbitrary object that is passed to the listener on call
165479
public void putMsgfunc(MsgListener listener, Object userhandle, int mask) throws LpSolveException {
		msgListener = listener;
		msgUserhandle = (listener != null) ? userhandle : null;
		addLp(this);
		registerMsgfunc(mask);
	}
50924
public synchronized void resolveClientObject (
        final Name username, final ClientResolutionListener listener)
    {
        // look to see if the client object is already resolved
        final ClientObject clobj = _objmap.get(username);
        if (clobj != null) {
            // report that the client is resolved on the dobjmgr thread to provide equivalent
            // behavior to the case where we actually have to do the resolution
            clobj.reference();
            _omgr.postRunnable(new Runnable() {
                public void run () {
                    listener.clientResolved(username, clobj);
                }
            });
            return;
        }

        // look to see if it's currently being resolved
        ClientResolver clr = _penders.get(username);
        if (clr != null) {
            // throw this guy onto the bandwagon
            clr.addResolutionListener(listener);
            return;
        }

        // figure out our client resolver class
        Class<? extends ClientResolver> resolverClass = null;
        for (SessionFactory factory : _factories) {
            if ((resolverClass = factory.getClientResolverClass(username)) != null) {
                break;
            }
        }

        try {
            // create a client resolver instance which will create our client object, populate it
            // and notify the listeners
            clr = _injector.getInstance(resolverClass);
            clr.init(username);
            clr.addResolutionListener(this);
            clr.addResolutionListener(listener);
            _penders.put(username, clr);

            // create and register our client object and give it back to the client resolver; we
            // need to do this on the dobjmgr thread since we're registering an object
            final ClientResolver fclr = clr;
            _omgr.postRunnable(new Runnable() {
                public void run () {
                    ClientObject clobj = fclr.createClientObject();
                    clobj.setLocal(ClientLocal.class, fclr.createLocalAttribute());
                    fclr.objectAvailable(_omgr.registerObject(clobj));
                }
            });

        } catch (Exception e) {
            // let the listener know that we're hosed
            listener.resolutionFailed(username, e);
        }
    }
985535
public ExecuterManager bindListener(Class<? extends IExecutersListener> listener) throws IllegalAccessException, InstantiationException {
        if (listener != null) {
            this.executerListeners.add(listener.newInstance());
        }
        return this;
    }
61320
public synchronized void register(@NonNull EventHandlerWrapper eventHandler) {
        String type = eventHandler.type;
        List<EventHandlerWrapper> handlers = subscribers.get(eventHandler.type);
        if (handlers == null) {
            handlers = new ArrayList<>();
            subscribers.put(type, handlers);
        }
        handlers.add(eventHandler);
    }
1254452
private static void registerMiddlewareHandler(Object handler) {
		if(handler instanceof MiddlewareHandler) {
			// register the middleware handler if it is enabled.
			if(((MiddlewareHandler) handler).isEnabled()) {
				((MiddlewareHandler) handler).register();
			}
		}
	}
1101572
public static synchronized void registerUserThread(String service, UserThreadPool userThreadPool) {
        if (userThreadMap == null) {
            userThreadMap = new ConcurrentHashMap<String, UserThreadPool>();
        }
        userThreadMap.put(service, userThreadPool);
    }
527134
public synchronized void registerSSLConfigChangeListener(SSLConfigChangeListener listener, SSLConfigChangeEvent event) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "registerSSLConfigChangeListener", new Object[] { listener, event });

        List<SSLConfigChangeListener> listenerList = sslConfigListenerMap.get(event.getAlias());

        if (listenerList != null) {
            // used to hold sslconfig -> list of listener references
            listenerList.add(listener);
            sslConfigListenerMap.put(event.getAlias(), listenerList);
        } else {
            listenerList = new ArrayList<SSLConfigChangeListener>();
            listenerList.add(listener);
            sslConfigListenerMap.put(event.getAlias(), listenerList);
        }

        // used to hold listener -> listener event references
        sslConfigListenerEventMap.put(listener, event);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "registerSSLConfigChangeListener");
    }
984993
public AutoCloseable registerHandler(
      final Class<? extends T> messageType,
      final EventHandler<RemoteMessage<? extends T>> theHandler) {

    this.msgTypeToHandlerMap.put(messageType, theHandler);

    LOG.log(Level.FINER, "Add handler for class: {0}", messageType.getCanonicalName());

    return new SubscriptionHandler<>(messageType, this.unsubscribeClass);
  }
641342
public void addHandler(Handler handler) {
        if (null == handlers) {
            handlers = new ArrayList<>();
        }
        handlers.add(handler);
    }
1228576
@RestrictTo(LIBRARY)
	public void notifyUseCaseStart(UseCaseListener listener) {
		try {
			LOGGER.debug("Notifying " + getClass().getSimpleName() + " start to listener " + listener.getClass().getSimpleName());
			listener.onStartUseCase();
		} catch (Exception e) {
			AbstractException abstractException = wrapException(e);
			logHandledException(abstractException);
		}
	}
533453
public void addHandler(AbstractHandler handler) {
    HandlerList handlers = new HandlerList();
    handlers.addHandler(handler);
    for (Handler h : mServer.getHandlers()) {
      handlers.addHandler(h);
    }
    mServer.setHandler(handlers);
  }
163028
public void registerListener(IPluginEventListener listener) {
        if (pluginEventListeners2 == null) {
            pluginEventListeners2 = new ArrayList<>();
        }

        if (!pluginEventListeners2.contains(listener)) {
            pluginEventListeners2.add(listener);
            listener.onPluginEvent(new PluginEvent(this, PluginAction.SUBSCRIBE));
        }
    }
501183
@RestrictTo(LIBRARY)
	public void notifyFailedUseCase(AbstractException exception, UseCaseListener listener) {
		try {
			LOGGER.debug("Notifying " + getClass().getSimpleName() + " finish failed to listener " + listener.getClass().getSimpleName());
			listener.onFinishFailedUseCase(exception);
		} catch (Exception e) {
			AbstractException abstractException = wrapException(e);
			logHandledException(abstractException);
		}
	}
1123576
public void registerHandler(String method, String url, OphApiHandler handler) {
		if (mtdHandler == null)
			mtdHandler = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

		TreeMap<String, OphApiHandler> reg;
		if (method == null)
			method = "ALL";
		reg = mtdHandler.get(method);
		if (reg == null) {
			reg = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
			mtdHandler.put(method, reg);
		}
		reg.put(url, handler);
	}
1320346
public static void registerLogListener(@NonNull final Context context, @NonNull final DfuLogListener listener) {
		if (mLogBroadcastReceiver == null) {
			mLogBroadcastReceiver = new LogBroadcastReceiver();

			final IntentFilter filter = new IntentFilter();
			filter.addAction(DfuBaseService.BROADCAST_LOG);
			LocalBroadcastManager.getInstance(context).registerReceiver(mLogBroadcastReceiver, filter);
		}
		mLogBroadcastReceiver.setLogListener(listener);
	}
654862
private void callHandleMethod(Method method, Object instance, ApiZone apiZone,
            Object userAgent) {
        ReflectMethodUtil.invokeHandleMethod(method, instance, context, apiZone, userAgent);
    }
915265
public void registerListener(final StatusListener listener) {
        listenersLock.writeLock().lock();
        try {
            listeners.add(listener);
            final Level lvl = listener.getStatusLevel();
            if (listenersLevel < lvl.intLevel()) {
                listenersLevel = lvl.intLevel();
            }
        } finally {
            listenersLock.writeLock().unlock();
        }
    }