Examples of AmqpValue


Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

         {
            case 0:
            case 1:
               return new Data(new Binary(message.getBodyBuffer().copy().channelBuffer().array()));
            case 2:
               return new AmqpValue(new Binary(message.getBodyBuffer().copy().channelBuffer().array()));
            case 3:
               return new AmqpValue(message.getBodyBuffer().copy().readNullableString());
            default:
               return new Data(new Binary(message.getBodyBuffer().copy().channelBuffer().array()));
         }
      }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

            mng.start();
            Message msg = new MessageImpl();
            msg.setAddress(address);
            if (subject != null) msg.setSubject(subject);
            for (String body : bodies) {
                msg.setBody(new AmqpValue(body));
                mng.put(msg);
            }
            mng.send();
            mng.stop();
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

            {
                section = new AmqpSequence((List)obj);
            }
            else
            {
                section = new AmqpValue(obj);
            }
        }
        _body = section;
    }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue


        LOGGER.fine(bold("======== About to create a message and send it to the server"));

        _client.message = _messageFactory.createMessage();
        Section messageBody = new AmqpValue("Hello");
        _client.message.setBody(messageBody);
        _client.messageData = new byte[BUFFER_SIZE];
        int lengthOfEncodedMessage = _client.message.encode(_client.messageData, 0, BUFFER_SIZE);
        _testLoggingHelper.prettyPrint(TestLoggingHelper.MESSAGE_PREFIX, Arrays.copyOf(_client.messageData, lengthOfEncodedMessage));
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

            {
                section = new AmqpSequence((List)obj);
            }
            else
            {
                section = new AmqpValue(obj);
            }
        }
        _body = section;
    }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

        return val.getValue();
    }

    public AmqpValue newInstance(Object described)
    {
        return new AmqpValue( described );
    }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

   private static int getMessageType(Message protonMessage)
   {
      Section section = protonMessage.getBody();
      if (section instanceof AmqpValue)
      {
         AmqpValue amqpValue = (AmqpValue) section;
         Object value = amqpValue.getValue();
         if (value instanceof String)
         {
            return TEXT_TYPE;
         }
         else if (value instanceof byte[])
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

         message.setTimestamp(System.currentTimeMillis());

         Section section = protonMessage.getBody();
         if (section instanceof AmqpValue)
         {
            AmqpValue amqpValue = (AmqpValue) section;
            Object value = amqpValue.getValue();
            if (value instanceof String)
            {
               message.getBodyBuffer().writeNullableString((String) value);
            }
            else if (value instanceof Binary)
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.AmqpValue

         {
            case 0:
            case 1:
               return new Data(new Binary(message.getBodyBuffer().copy().byteBuf().array()));
            case 2:
               return new AmqpValue(new Binary(message.getBodyBuffer().copy().byteBuf().array()));
            case 3:
               return new AmqpValue(message.getBodyBuffer().copy().readNullableString());
            default:
               return new Data(new Binary(message.getBodyBuffer().copy().byteBuf().array()));
         }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.