Sets the reference to a dynamic MBean.
491576
protected void setMBean(ServiceReference<?> ref) {
        // Use "jmx.objectname" for determining the ObjectName to be consistent with Apache Aries.
        Object jmxObjectName = ref.getProperty("jmx.objectname");
        if (jmxObjectName instanceof String) {
            try {
                // Construct an ObjectName from the "jmx.objectname" property and register the MBean.
                ObjectName name = new ObjectName((String) jmxObjectName);
                setServiceReferenceInternal(ref, name);
            } catch (MalformedObjectNameException e) {
                // One of our MBeans had a bad ObjectName.
                // TODO: trace, FFDC?
            }
        } else {
            // REVISIT: "jmx.objectname" was not specified or was not in
            // the right format. Ignoring this MBean for now since we don't
            // have an ObjectName. Possible that this MBean is a
            // javax.management.MBeanRegistration, do we want to try to
            // register it that way?
        }
    }
281437
public void setReferencesOn(Bean bean) {
        for (KeyValue ref : references.values()) {
            final byte[] sidpid = ref.getQualifier();
            final byte[] iids = ref.getValue();
            final byte[] sid = new byte[] { sidpid[0], sidpid[1] };
            final byte[] pid = new byte[] { sidpid[2], sidpid[3] };

            final String schemaName = uids.getUsid().getName(sid);
            final String propertyName = uids.getUsid().getName(pid);

            for (int i = 0; i < iids.length; i += IID_WIDTH) {
                final byte[] iid = new byte[] { iids[i], iids[i + 1], iids[i + 2], iids[i + 3] };
                final String instanceId = uids.getUiid().getName(iid);
                bean.addReference(propertyName, BeanId.create(instanceId, schemaName));
            }
        }
    }
260103
def __set_binding(self, dependency, service, reference):
        # type: (Any, Any, ServiceReference) -> None
        
        # Set the value
        setattr(self.instance, dependency.get_field(), dependency.get_value())

        # Call the component back
        self.safe_callback(constants.IPOPO_CALLBACK_BIND, service, reference)

        self.__safe_field_callback(
            dependency.get_field(),
            constants.IPOPO_CALLBACK_BIND_FIELD,
            service,
            reference,
        )
1037944
def _setter(self, obj, value):
        
        if isinstance(value, DynamicValue):  # execute lambda values.
            fvalue = value()

        else:
            fvalue = value

        self._validate(data=fvalue, owner=obj)

        if self._fset_ is not None:
            self._fset_(obj, fvalue)

        else:
            setattr(obj, self._attrname(), value)

        # notify obj about the new value.
        if isinstance(obj, Schema):
            obj._setvalue(self, fvalue)
235419
@org.osgi.service.component.annotations.Reference(target = "(jmx.objectname=WebSphere:feature=kernel,name=ServerInfo)", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE, policyOption = ReferencePolicyOption.GREEDY)
    protected void setServerInfoMBean(ServerInfoMBean serverInfoMBean) {
        this.serverInfoMBean = serverInfoMBean;
    }
98774
protected final void set(M config) {
        ArrayList<WeakReference<ConfigListener<M,F>>> iterateOver;
        synchronized (this) {
            M old = instance.get();
            if (old == config || (old != null && old.equals(config))) {
                return;
            }

            instance.set(config);
            lastUpdateTimestamp.set(clock.millis());
            listeners.removeIf(ref -> ref.get() == null);
            iterateOver = new ArrayList<>(listeners);
        }
        iterateOver.forEach(ref -> {
            ConfigListener<M,F> listener = ref.get();
            if (listener != null) {
                try {
                    listener.onConfigChange(config);
                } catch (Exception ignore) {
                    // Ignored... TODO: At least log?
                }
            }
        });
    }
433477
private void createDynamicConfigManager() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "createDynamicConfigManager");

        _dynamicConfigManager = new DynamicConfigManager(this);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "createDynamicConfigManager");
    }
336195
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)
    protected void setJobExecutionEndCallbackService(IJobExecutionEndCallbackService reference) {
        jobExecutionEndCallbacks.add(reference);
    }
1221662
public void set(V newReference, boolean newMark) {
        Pair<V> current = pair;
        if (newReference != current.reference || newMark != current.mark)
            this.pair = Pair.of(newReference, newMark);
    }
1181919
public void setReferences(IReferences references) throws ReferenceException {
		_dependencyResolver.setReferences(references);
        _logger.setReferences(references);
        _counters.setReferences(references);	
	}
419697
@Override
  public final synchronized void set(final String pBeanName,
    final IConverterIntoByName<?, ColumnsValues> pBean) throws Exception {
    this.convertersMap.put(pBeanName, pBean);
  }
983208
def bind(self, *args, **kwargs):
        """"""
        if self.bound:  # Prevent double-binding
            return
        super(DynamicRelationField, self).bind(*args, **kwargs)
        self.bound = True
        parent_model = getattr(self.parent.Meta, 'model', None)

        remote = is_field_remote(parent_model, self.source)

        try:
            model_field = get_model_field(parent_model, self.source)
        except:
            # model field may not be available for m2o fields with no
            # related_name
            model_field = None

        # Infer `required` and `allow_null`
        if 'required' not in self.kwargs and (
                remote or (
                    model_field and (
                        model_field.has_default() or model_field.null
                    )
                )
        ):
            self.required = False
        if 'allow_null' not in self.kwargs and getattr(
                model_field, 'null', False
        ):
            self.allow_null = True

        self.model_field = model_field
473787
public static void setJPAComponent(JPAComponent instance)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "setJPAComponent", instance);

        jpaComponent = instance;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "setJPAComponent");
    }
268781
protected void setExecutor(ServiceReference<ExecutorService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setExecutor", ref);
        execSvcRef.setReference(ref);
    }
856342
@Reference(name = KEY_MESSAGE_STORE, service = MessageStore.class)
    protected void setMessageStore(ServiceReference<MessageStore> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.entry(tc, "setMessageStore", ref);
        messageStoreRef.setReference(ref);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.exit(tc, "setMessageStore");
    }
526391
public Subscription register(final Object mBean, final String name){
        try {
            if (mbeanSupport.get()) {
                final ObjectName objectName = new ObjectName(name);
                server.registerMBean(mBean, objectName);
                return new Subscription() {
                    @Override
                    public void unsubscribe() {
                        try {
                            server.unregisterMBean(objectName);
                        } catch (JMException e) {
                            throw new RuntimeException("Can not unsubscribe!", e);
                        }
                    }
                };
            } else {
                return new Subscription() {
                    @Override
                    public void unsubscribe() {
                    }
                };
            }
        } catch (Exception e) {
            throw new RuntimeException("Can not register MBean!", e);
        }
    }
332597
protected void setAuthDataService(ServiceReference<AuthDataService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setAuthDataService", ref);
        authDataServiceRef.setReference(ref);
    }