/*
Set the value of the ReplyTimeToLive field in the message header.

Javadoc description supplied by JsJmsMessage interface.
482130
@Override
    public final void uncheckedSetReplyTimeToLive(Long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "uncheckedSetReplyTimeToLive", value);
        if (value != null) {
            getApi().setField(JsApiAccess.REPLYTIMETOLIVE_VALUE, value);
        }
        else {
            getApi().setChoiceField(JsApiAccess.REPLYTIMETOLIVE, JsApiAccess.IS_REPLYTIMETOLIVE_UNSET);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "uncheckedSetReplyTimeToLive");
    }
810356
@Override
    public void setJmsDeliveryTime(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJmsDeliveryTime", Long.valueOf(value));
        getHdr2().setField(JsHdr2Access.JMSDELIVERYTIME_DATA, Long.valueOf(value));
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJmsDeliveryTime");

    }
1368855
protected void setValue(Object value) {
        this.value = value;
        serializedValue = null;
        timeStamp = System.currentTimeMillis();
        this.valueHashcode = 0;
    }
236477
@Override
    public void setContentType(String value) {
        if (isCommitted()) {
            return;
        }
        if (null == value) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "setContentType: null, removing header");
            }
            this.response.removeHeader("Content-Type");
            return;
        }
        boolean addEncoding = false;
        String type = value;

        // see if the input value contains a charset
        int charsetIndex = value.indexOf("charset=");
        if (-1 != charsetIndex) {
            if (null == this.outWriter) {
                // can update both mime-set and charset
                addEncoding = true;
                this.encoding = connection.getEncodingUtils().stripQuotes(value.substring(charsetIndex + 8));
            } else {
                // can only update the mimeset so strip the charset off
                type = value.substring(0, charsetIndex).trim();
                charsetIndex = -1;
            }
        }
        if (null != this.outWriter) {
            // can still update the mime-type but not charset
            addEncoding = true;
        } else {
            // TODO don't quite follow why webcontainer checks for text*
            if (type.startsWith("text")) {
                addEncoding = true;
            }
        }
        if (addEncoding) {
            if (-1 != charsetIndex) {
                type = type.substring(0, charsetIndex - 1);
            }
            if (this.encoding != null) {
                type = type + ";charset=" + this.encoding;
            }
        }
        this.contentType = type;
        this.response.setHeader("Content-Type", type);
    }
19342
public void setExpiry(Date expire) {
        addField(SubscribeOptionFields.expire, FormField.Type.text_single);
        setAnswer(SubscribeOptionFields.expire.getFieldName(), XmppDateTime.formatXEP0082Date(expire));
    }
497244
private void validateTimeToLive(long timeToLive) throws JMSException {
        if ((timeToLive < 0) || (timeToLive > MfpConstants.MAX_TIME_TO_LIVE)) {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0068",
                                                            new Object[] { "timeToLive", "" + timeToLive },
                                                            tc
                            );
        }

    }
951468
public void setValue(Object value, long timeout) {
		_value = value;
		_expiration = System.currentTimeMillis() + timeout;
	}
203244
protected void setMessage(byte[] msg) {
        try {
            readData(new DataInputStream(new ByteArrayInputStream(msg)));
        }
        catch (IOException ex) {
            logger.error("Problem setting response message - {}", ex.getMessage());
        }
    }
773982
public void setMessageControlClassification(String value) {
        if (value != null) {
            getHdr2().setField(JsHdr2Access.MESSAGECONTROLCLASSIFICATION_DATA, value);
        }
        else {
            getHdr2().setChoiceField(JsHdr2Access.MESSAGECONTROLCLASSIFICATION, JsHdr2Access.IS_MESSAGECONTROLCLASSIFICATION_EMPTY);
        }
    }
841925
public void setDateField(String name, long date)
    {
        if (_state!=__MSG_EDITABLE)
            return;
        _header.putDateField(name,date);
    }
86380
public final void setApiMessageId(String value) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setApiMessageId", value);
        if (value == null) {
            getApi().setField(JsApiAccess.MESSAGEID, null);
        }
        else if (value.startsWith(ID_STRING)) {
            byte[] binValue = HexString.hexToBin(value, 3);
            getApi().setField(JsApiAccess.MESSAGEID, binValue);
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setApiMessageId", "IllegalArgumentException");
            throw new IllegalArgumentException();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setApiMessageId");
    }
108403
public String setField(String name, String value)
    {
        if (_state!=__MSG_EDITABLE)
            return null;

        if (HttpFields.__ContentType.equalsIgnoreCase(name))
        {
            String old=_header.get(name);
            setContentType(value);
            return old;
        }
        
        return _header.put(name,value);
    }
397135
@Override
    final public void setTimeToLive(int timeToLive) {
        ValidateUtility.timeToLive(timeToLive);
        this.timeToLive = timeToLive;
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "setTimeToLive() set global timeToLive to " + timeToLive + " for cacheName=" + cache.getCacheName());
        }
    }
1363475
@Override
    public void setResponseHeader(String key, String value) {
        this.response.setResponseHeader(key, value);
    }
408476
@Override
    public void setDeliveryDelay(long deliveryDelayTime) throws JMSException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setDeliveryDelay", deliveryDelayTime);

        checkClosed();
        // Throws an exception if this is not a valid time to live.
        validateDeliveryDelayTime(deliveryDelayTime);
        // We know by this point that it must be valid.
        this.defaultDeliveryDelay = deliveryDelayTime;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setDeliveryDelay");

    }
1020072
@Deprecated
    public static void setDate(HttpMessage message, Date value) {
        message.headers().set(HttpHeaderNames.DATE, value);
    }
144574
function(str, sendUpdatedEvt) {
      inputEx.TimeField.superclass.setValue.call(this, str.split(':'), sendUpdatedEvt);
   }