/** * Sets an <CODE>int</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>int</CODE> * @param value the <CODE>int</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setInt(String name, int value) throws JMSException { initializeWriting(); put(name, Integer.valueOf(value)); }
/** * Sets a <CODE>float</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>float</CODE> * @param value the <CODE>float</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setFloat(String name, float value) throws JMSException { initializeWriting(); put(name, new Float(value)); }
/** * Sets a <CODE>short</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>short</CODE> * @param value the <CODE>short</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setShort(String name, short value) throws JMSException { initializeWriting(); put(name, Short.valueOf(value)); }
/** * Sets a <CODE>boolean</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>boolean</CODE> * @param value the <CODE>boolean</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setBoolean(String name, boolean value) throws JMSException { initializeWriting(); put(name, value ? Boolean.TRUE : Boolean.FALSE); }
/** * Sets a <CODE>long</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>long</CODE> * @param value the <CODE>long</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setLong(String name, long value) throws JMSException { initializeWriting(); put(name, Long.valueOf(value)); }
/** * Sets a <CODE>String</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>String</CODE> * @param value the <CODE>String</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setString(String name, String value) throws JMSException { initializeWriting(); put(name, value); }
/** * Sets a <CODE>byte</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>byte</CODE> * @param value the <CODE>byte</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setByte(String name, byte value) throws JMSException { initializeWriting(); put(name, Byte.valueOf(value)); }
/** * Sets a Unicode character value with the specified name into the Map. * * @param name the name of the Unicode character * @param value the Unicode character value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setChar(String name, char value) throws JMSException { initializeWriting(); put(name, Character.valueOf(value)); }
/** * Sets a <CODE>double</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>double</CODE> * @param value the <CODE>double</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setDouble(String name, double value) throws JMSException { initializeWriting(); put(name, new Double(value)); }
/** * Sets a byte array value with the specified name into the Map. * * @param name the name of the byte array * @param value the byte array value to set in the Map; the array is copied * so that the value for <CODE>name </CODE> will not be * altered by future modifications * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws NullPointerException if the name is null, or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setBytes(String name, byte[] value) throws JMSException { initializeWriting(); if (value != null) { put(name, value); } else { map.remove(name); } }
/** * Sets a portion of the byte array value with the specified name into the * Map. * * @param name the name of the byte array * @param value the byte array value to set in the Map * @param offset the initial offset within the byte array * @param length the number of bytes to use * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setBytes(String name, byte[] value, int offset, int length) throws JMSException { initializeWriting(); byte[] data = new byte[length]; System.arraycopy(value, offset, data, 0, length); put(name, data); }
/** * Sets an object value with the specified name into the Map. * <P> * This method works only for the objectified primitive object types (<code>Integer</code>,<code>Double</code>, * <code>Long</code> ...), <code>String</code> objects, and byte * arrays. * * @param name the name of the Java object * @param value the Java object value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageFormatException if the object is invalid. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setObject(String name, Object value) throws JMSException { initializeWriting(); if (value != null) { // byte[] not allowed on properties if (!(value instanceof byte[])) { checkValidObject(value); } put(name, value); } else { put(name, null); } }
/** * Sets a Unicode character value with the specified name into the Map. * * @param name the name of the Unicode character * @param value the Unicode character value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setChar(String name, char value) throws JMSException { initializeWriting(); put(name, Character.valueOf(value)); }
/** * Sets an <CODE>int</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>int</CODE> * @param value the <CODE>int</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setInt(String name, int value) throws JMSException { initializeWriting(); put(name, Integer.valueOf(value)); }
/** * Sets a <CODE>long</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>long</CODE> * @param value the <CODE>long</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setLong(String name, long value) throws JMSException { initializeWriting(); put(name, Long.valueOf(value)); }
/** * Sets a <CODE>String</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>String</CODE> * @param value the <CODE>String</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setString(String name, String value) throws JMSException { initializeWriting(); put(name, value); }
/** * Sets an <CODE>int</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>int</CODE> * @param value the <CODE>int</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ public void setInt(String name, int value) throws JMSException { initializeWriting(); put(name, Integer.valueOf(value)); }
/** * Sets a <CODE>boolean</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>boolean</CODE> * @param value the <CODE>boolean</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ public void setBoolean(String name, boolean value) throws JMSException { initializeWriting(); put(name, value ? Boolean.TRUE : Boolean.FALSE); }
/** * Sets a Unicode character value with the specified name into the Map. * * @param name the name of the Unicode character * @param value the Unicode character value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setChar(String name, char value) throws JMSException { initializeWriting(); put(name, Character.valueOf(value)); }
/** * Sets a <CODE>short</CODE> value with the specified name into the Map. * * @param name the name of the <CODE>short</CODE> * @param value the <CODE>short</CODE> value to set in the Map * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws IllegalArgumentException if the name is null or if the name is an * empty string. * @throws MessageNotWriteableException if the message is in read-only mode. */ @Override public void setShort(String name, short value) throws JMSException { initializeWriting(); put(name, Short.valueOf(value)); }