/*
Set the source Messaging Engine that originated the message.

Javadoc description supplied by CommonMessageHeaders interface.
355291
public final void setGuaranteedSourceMessagingEngineUUID(SIBUuid8 value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedSourceMessagingEngineUUID", value);
        if (value != null)
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_SOURCEMEUUID, value.toByteArray());
        else
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_SOURCEMEUUID, null);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedSourceMessagingEngineUUID");
    }
282340
public DocumentVersionMetadata withSource(java.util.Map<String, String> source) {
        setSource(source);
        return this;
    }
930115
public void setMessageText(SendableTextMessage.SendableTextMessageBuilder messageBuilder) {
        SendableTextMessage message = messageBuilder.build();
        baseMessage.getBotInstance().editMessageText(baseMessage, message.getMessage(), message.getParseMode(),
                message.isDisableWebPagePreview(), toKeyboard());
    }
639025
final void setJsMessageType(MessageType value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJsMessageType", value);
        /* Get the int value of the MessageType and set that into the field */
        jmo.setField(JsHdrAccess.MESSAGETYPE, value.toByte());
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJsMessageType");
    }
227492
@Override
    void addMessagingEngine(JsMessagingEngine messagingEngine) throws ResourceException
    {
        final String methodName = "addMessagingEngine";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, messagingEngine);
        }
        if ((_destinationStrategy.isNonDurablePubSub()) && (_connections.size() > 0))
        {
            // Ignore for non durable pub sub
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
            {
                SibTr.exit(this, TRACE, methodName);
            }
            return;
        }
        else
        {
            clearTimer();
            checkMEs(new JsMessagingEngine[] { messagingEngine });
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName);
        }
    }
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);
        }

    }
28231
public void startMessagingEngine(String busName, String name)
                    throws Exception {

        String thisMethodName = CLASS_NAME
                                + ".startMessagingEngine(String, String)";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, new Object[] { busName, name });
        }

        BaseMessagingEngineImpl me = (BaseMessagingEngineImpl) getMessagingEngine(
                                                                                  busName, name);
        if (me != null) {
            me.startConditional();
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Unable to locate engine <bus=" + busName
                                + " name=" + name + ">");
            throw new Exception("The messaging engine <bus=" + busName
                                + " name=" + name + "> does not exist");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName);
        }
    }
447399
public synchronized void setSource(Source source) {
        String sourceId = CollectorManagerUtils.getSourceId(source);
        SourceManager srcMgr = null;
        if (!sourceMgrs.containsKey(sourceId)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Adding source to the list", source.getClass());
            }
            srcMgr = new SourceManager(source);
            sourceMgrs.put(srcMgr.getSourceId(), srcMgr);
            /*
             * Obtain the conduit/bufferManager and put it in bufferManagerMap
             * if the source being set is message/log or trace.
             *
             * This is to make up for the prior logic where conduit/bufferManager
             * were created before the source was created and were set into the bufferManagerMap
             *
             * With the new logic concerning LogSource and TraceSource for JsonLogging, the LogSource
             * and TraceSource and their respective Conduit/BufferManager were created outside of
             * CollectorManager and OSGI serviceability. Thus, the following call to processInitializedConduits
             * retrieves the conduits/bufferManagers that were created 'outside' collectorManager's realm of
             * control and places them into bufferManagerMap because the following logic expects the prior
             * statement to be true.
             *
             * Alas, continue 'as normal' afterwards.
             */
            processInitializedConduits(source);

            //Passes BufferManager onto SourceManager which will then associate a Handler to it.
            srcMgr.setBufferManager(bufferManagerMap.get(sourceId));
            //Handle pending subscriptions for this source
            for (Entry<String, HandlerManager> entry : handlerMgrs.entrySet()) {
                HandlerManager hdlrMgr = entry.getValue();
                //Check if source is in the pending subscription list for this handler
                if (hdlrMgr.getPendingSubscriptions().contains(sourceId)) {
                    List<String> sourceIds = new ArrayList<String>();
                    sourceIds.add(sourceId);
                    try {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Handling pending subscription " + sourceId,
                                     hdlrMgr.getHandlerId());
                        }
                        subscribe(hdlrMgr.getHandler(), sourceIds);
                    } catch (Exception e) {

                    }
                }
            }
        }
    }
501512
public JsMessagingEngine getMessagingEngine(String busName, String engine) {
    if (!isInitialized()) {
      return null;
    }
    return _jsmain.getMessagingEngine(busName, engine);
  }
220801
public void setSource(final String sourceText) {
		String formattedSource;

		if (sourceText == null) {
			formattedSource = "";
		} else {
			formattedSource = WebUtilities.encode(sourceText); // XML escape content
		}

		source.setText(formattedSource);
	}
356545
public final void setSource(Node source) {
    if (prototypeSlot != null) {
      // NOTE(bashir): On one hand when source is null we want to drop any
      // references to old nodes retained in prototypeSlot. On the other hand
      // we cannot simply drop prototypeSlot, so we retain all information
      // except the propertyNode for which we use an approximation! These
      // details mostly matter in hot-swap passes.
      if (source == null || prototypeSlot.getNode() == null) {
        prototypeSlot =
            new Property(
                prototypeSlot.getName(),
                prototypeSlot.getType(),
                prototypeSlot.isTypeInferred(),
                source);
      }
    }
    this.source = source;
  }
246244
public final SIBUuid8 getGuaranteedSourceMessagingEngineUUID() {
    byte[] b = (byte[])jmo.getField(ControlAccess.SOURCEMEUUID);
    if (b != null)
      return new SIBUuid8(b);
    return null;
  }
299241
public static void set(Message message, ExplicitMessageEncryptionProtocol protocol) {
        if (!hasProtocol(message, protocol.namespace)) {
            message.addExtension(new ExplicitMessageEncryptionElement(protocol));
        }
    }
216006
public final void setGuaranteedTargetMessagingEngineUUID(SIBUuid8 value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedTargetMessagingEngineUUID", value);
        if (value != null)
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_TARGETMEUUID, value.toByteArray());
        else
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_TARGETMEUUID, null);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedTargetMessagingEngineUUID");
    }
1333268
public void setSourceAlgorithms(java.util.Collection<SourceAlgorithm> sourceAlgorithms) {
        if (sourceAlgorithms == null) {
            this.sourceAlgorithms = null;
            return;
        }

        this.sourceAlgorithms = new java.util.ArrayList<SourceAlgorithm>(sourceAlgorithms);
    }
836034
public void setOriginString(String originString) {
		this.originString = originString;
		if (this.sentAttrSpecifications) {
			AttributeAnnounceMessage msg = new AttributeAnnounceMessage();
			msg.setOrigin(originString);
			this.session.write(msg);
		}
	}
1282368
@com.fasterxml.jackson.annotation.JsonProperty("OriginalMessage")
    public void setOriginalMessage(String originalMessage) {
        this.originalMessage = originalMessage;
    }