Package com.caucho.jms.message

Examples of com.caucho.jms.message.TextMessageImpl


   * Writes the message header for a Resin message.
   */
  private TextMessageImpl readTextMessage(InputStream is)
    throws IOException, JMSException
  {
    TextMessageImpl text = new TextMessageImpl();

    if (is == null)
      return text;

    ByteToChar byteToChar = ByteToChar.create();

    int ch;

    byteToChar.setEncoding("UTF-8");
    while ((ch = is.read()) >= 0) {
      byteToChar.addByte(ch);
    }

    text.setText(byteToChar.getConvertedString());
   
    return text;
  }
View Full Code Here


  public TextMessage createTextMessage()
    throws JMSException
  {
    checkOpen();
   
    return new TextMessageImpl();
  }
View Full Code Here

      if (payload instanceof MessageImpl) {
        msg = (MessageImpl) payload;
      }
      else if (payload instanceof String) {
        msg = new TextMessageImpl((String) payload);
        msg.setJMSMessageID(entry.getMsgId());
      }
      else {
        msg = new ObjectMessageImpl((Serializable) payload);
        msg.setJMSMessageID(entry.getMsgId());
View Full Code Here

      try {
        if (payload instanceof MessageImpl)
          message = (MessageImpl) payload;
        else if (payload instanceof String) {
          message = new TextMessageImpl((String) payload);
          message.setJMSMessageID(msgId);
        }
        else {
          message = new ObjectMessageImpl((Serializable) payload);
          message.setJMSMessageID(msgId);
View Full Code Here

   * Writes the message header for a Resin message.
   */
  private TextMessageImpl readTextMessage(InputStream is)
    throws IOException, JMSException
  {
    TextMessageImpl text = new TextMessageImpl();

    if (is == null)
      return text;

    ByteToChar byteToChar = ByteToChar.create();

    int ch;

    byteToChar.setEncoding("UTF-8");
    while ((ch = is.read()) >= 0) {
      byteToChar.addByte(ch);
    }

    text.setText(byteToChar.getConvertedString());
   
    return text;
  }
View Full Code Here

      if (payload instanceof MessageImpl) {
  msg = (MessageImpl) payload;
      }
      else if (payload instanceof String) {
  msg = new TextMessageImpl((String) payload);
  msg.setJMSMessageID(entry.getMsgId());
      }
      else {
  msg = new ObjectMessageImpl((Serializable) payload);
  msg.setJMSMessageID(entry.getMsgId());
View Full Code Here

      try {
  if (payload instanceof MessageImpl)
    message = (MessageImpl) payload;
  else if (payload instanceof String) {
    message = new TextMessageImpl((String) payload);
    message.setJMSMessageID(msgId);
  }
  else {
    message = new ObjectMessageImpl((Serializable) payload);
    message.setJMSMessageID(msgId);
View Full Code Here

  public TextMessage createTextMessage()
    throws JMSException
  {
    checkOpen();
   
    return new TextMessageImpl();
  }
View Full Code Here

TOP

Related Classes of com.caucho.jms.message.TextMessageImpl

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.