Package javax.jms

Examples of javax.jms.MessageNotWriteableException


   public void setLong(final String name, final long value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, new Long(value));

   }
View Full Code Here


   public void setFloat(final String name, final float value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, new Float(value));

   }
View Full Code Here

   public void setDouble(final String name, final double value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, new Double(value));

   }
View Full Code Here

   public void setString(final String name, final String value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, value);

   }
View Full Code Here

   public void setBytes(final String name, final byte[] value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, value.clone());

   }
View Full Code Here

   public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      if (offset + length > value.length)
      {
         throw new JMSException("Array is too small");
View Full Code Here

   public void setObject(final String name, final Object value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      if (value instanceof Boolean)
      {
         content.put(name, value);
View Full Code Here

   public void setBoolean(final String name, final boolean value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, Boolean.valueOf(value));

   }
View Full Code Here

   public void setByte(final String name, final byte value) throws JMSException
   {
      checkName(name);
      if (bodyReadOnly)
      {
         throw new MessageNotWriteableException("Message is ReadOnly !");
      }

      content.put(name, new Byte(value));

   }
View Full Code Here

   public void setInputStream(final InputStream input) throws JMSException
   {
      checkStream();
      if (readOnly)
      {
         throw new MessageNotWriteableException("Message is read-only");
      }

      message.setBodyInputStream(input);
   }
View Full Code Here

TOP

Related Classes of javax.jms.MessageNotWriteableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.