Package org.apache.qpid.proton.amqp.messaging

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


   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

         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

         {
            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

Related Classes of org.apache.qpid.proton.amqp.messaging.AmqpValue

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.