Set the "ownership" of this message to either a new servicecontext, i.e.
a message is being transfered from an inbound SC to and outbound SC, or
a channel wants to cache this message and would pass in null to this
method.

@param hsc
333435
public void setOwner(HttpServiceContext hsc) {
        // if we have an SC owner, set it's flag to false
        if (null != getServiceContext()) {
            getServiceContext().setResponseOwner(false);
        }
        // if the owner is a new HSC, then init the flags
        if (null != hsc) {
            super.init(hsc);
            getServiceContext().setResponseOwner(true);
            setIncoming(!getServiceContext().isInboundConnection());
            if (!isIncoming()) {
                // outgoing responses need header validation checks.. if config
                // hasn't disabled them
                setHeaderValidation(getServiceContext().getHttpConfig().isHeaderValidationEnabled());
            }
        }
    }
865138
@Reference(name = "contextService", service = WSContextService.class)
    protected void setContextService(ServiceReference<WSContextService> ref) {
        contextServiceRef.setReference(ref);
    }
585351
public void setAwayMessage (String message)
    {
        if (message != null) {
            message = filter(message, null, true);
            if (message == null) {
                // they filtered away their own away message... change it to something
                message = "...";
            }
        }
        // pass the buck right on along
        _cservice.away(message);
    }
620274
@Reference(cardinality=ReferenceCardinality.MANDATORY, policy=ReferencePolicy.DYNAMIC, policyOption=ReferencePolicyOption.GREEDY)
    protected void setConnContextPool(SRTConnectionContextPool pool) {
        this.connContextPool = pool;
    }
1235996
public void setCommerceDiscountUsageEntryLocalService(
		com.liferay.commerce.discount.service.CommerceDiscountUsageEntryLocalService commerceDiscountUsageEntryLocalService) {
		this.commerceDiscountUsageEntryLocalService = commerceDiscountUsageEntryLocalService;
	}
315632
public void setNamespaceContext(NamespaceContext nsContext) {
        if ( nsContext == null ) {
            String fmsg = XSLMessages.createXPATHMessage( 
                    XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
                    new Object[] {"NamespaceContext"} );
            throw new NullPointerException( fmsg ); 
        }
        this.namespaceContext = nsContext;
        this.prefixResolver = new JAXPPrefixResolver ( nsContext );
    }
936550
public void setHsmsPendingDeletion(java.util.Collection<String> hsmsPendingDeletion) {
        if (hsmsPendingDeletion == null) {
            this.hsmsPendingDeletion = null;
            return;
        }

        this.hsmsPendingDeletion = new com.amazonaws.internal.SdkInternalList<String>(hsmsPendingDeletion);
    }
306442
public void setOwner(ListenerOwner owner)
    {
        if (owner == null)
        {
            this.saveValue(m_recordOwnerCache);
            m_recordOwnerCache = null;
        }
        super.setOwner(owner);
        if (owner != null)
            this.retrieveValue();
    }
456217
public static void setMessageAccountId(Message sqsMessage, String s3ObjectKey) {
        if (!sqsMessage.getAttributes().containsKey(SourceAttributeKeys.ACCOUNT_ID.getAttributeKey())) {
            String accountId = extractAccountIdFromObjectKey(s3ObjectKey);
            if (accountId != null) {
                sqsMessage.addAttributesEntry(SourceAttributeKeys.ACCOUNT_ID.getAttributeKey(), accountId);
            }
        }
    }
592311
public void setCPMeasurementUnitLocalService(
		com.liferay.commerce.product.service.CPMeasurementUnitLocalService cpMeasurementUnitLocalService) {
		this.cpMeasurementUnitLocalService = cpMeasurementUnitLocalService;
	}
842909
private Object ownership(Object val, boolean forceShared) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "ownership", new Object[] { val, Boolean.valueOf(forceShared) });

        if (val instanceof JSMessageData) {
            ((JSMessageData) val).setParent(compatibilityWrapperOrSelf);

            if (forceShared) {
                ((JSMessageData) val).sharedContents = true;
            }
        }
        else if (val instanceof JMFEncapsulation) {
            ((JMFEncapsulation) val).setContainingMessageData(compatibilityWrapperOrSelf);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "ownership", val);
        return val;
    }
368700
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            this.setupGridOrder();      // Set the initial grid order
            if (m_gridScreen != null)
            {
                m_gridScreen.setConverter(this.getOwner());   // The grid screen will automatically change this field to match the key order.
                this.getOwner().addComponent(m_gridScreen);
            }
        }
    }
1336999
public void activate(ComponentContext cc) {
        executorServiceRef.activate(cc);
        contextServiceRef.activate(cc);
        ReactiveStreamsFactoryResolver.setInstance(new ReactiveStreamsFactoryImpl());
        ReactiveStreamsEngineResolver.setInstance(this);
        singleton = this;
    }
1128009
public void registerServiceInstance(ProvidedServiceInstance instance, final RegistrationCallback cb, Object context){

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.RegisterServiceInstance);

        RegisterServiceInstanceProtocol p = new RegisterServiceInstanceProtocol(instance);

        ProtocolCallback pcb = new ProtocolCallback(){

            @Override
            public void call(boolean result, Response response,
                    ErrorCode error, Object ctx) {
                cb.call(result, error, ctx);
            }

        };

        connection.submitCallbackRequest(header, p, pcb, context);

    }
335933
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
            this.syncBehaviorToRecord(this.getOwner().getRecord().getField(m_iMainFilesFieldSeq));  // Init now
    }
1362258
@Trivial
    protected void setSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.entry(this, tc, "setSslSupport", new Object[] { ref.getProperty("type"), ref });
        }

        // If sslsupport is bound then set it to true 
        _isSSLEnabled = true;

        // bind can get called before unbind for new config/ modify.Hence the precaution
        if (_sslFactoryProvider.getReference() != null) { // existing chain is still there so destroy 
            if (_isChainStarted)
                performAction(destroyChainAction);
        }

        _sslFactoryProvider.setReference(ref);
        // we will only invoke createchain if 
        // 1) activate() is complete
        // this is because bind method get called first before activate and without activate we don't have any properties
        // 2) if useSSL is set in config 
        if (_isActivated && _isSSLChain) {
            //TODO: when executor service is used for performaction() make sure about sequence of destroy and create chain
            //Now currently its not threaded
            if (_isChainStarted)
                performAction(destroyChainAction);
            performAction(createChainAction);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setSslSupport", _isSSLEnabled);
        }
    }
1319886
public static void set(Headers headers, Object destination) {

    Field[] publicFields;
    Field[] privateFields;
    Field[] fields;

    Class<?> cls = destination.getClass();
    publicFields = cls.getFields();
    privateFields = cls.getDeclaredFields();
    fields = new Field[publicFields.length + privateFields.length];
    System.arraycopy(publicFields, 0, fields, 0, publicFields.length);
    System.arraycopy(privateFields, 0, fields, publicFields.length, privateFields.length);

    for (Field field : fields) {
      Annotation annotation = field.getAnnotation(Header.class);
      if (annotation == null) {
        continue;
      }

      Header httpHeader = (Header) annotation;
      String value = httpHeader.value();
      String setter = httpHeader.setter();
      if (setter.isEmpty()) {
        // assume setter name as 'setFieldName'
        String name = field.getName();
        setter = "set" + name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1);
      }

      try {
        Method setterMethod = cls.getMethod(setter, new Class[]{String.class});
        String valueString = headers.get(value);
        if (valueString != null) {
          setterMethod.invoke(destination, valueString);
        }
      } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException
               | IllegalArgumentException e) {
        LOGGER.log(Level.SEVERE, "exception occured: ", e);
        LOGGER.log(Level.INFO, "setter: " + setter);
        LOGGER.log(Level.INFO, "annotation: " + value);
        LOGGER.log(Level.INFO, "value: " + headers.get(value));
      }
    }
  }