Examples of Binary


Examples of org.apache.qpid.amqp_1_0.type.Binary

            storedMessage.flushToStore();

            Message_1_0 message = new Message_1_0(storedMessage, fragments, getSession());


            Binary transactionId = null;
            org.apache.qpid.amqp_1_0.type.DeliveryState xfrState = xfr.getState();
            if(xfrState != null)
            {
                if(xfrState instanceof TransactionalState)
                {
                    transactionId = ((TransactionalState)xfrState).getTxnId();
                }
            }

            ServerTransaction transaction = null;
            if(transactionId != null)
            {
                transaction = getSession().getTransaction(transactionId);
            }
            else
            {
                Session_1_0 session = getSession();
                transaction = session != null ? session.getTransaction(null) : new AutoCommitTransaction(_vhost.getMessageStore());
            }

            Outcome outcome = _destination.send(message, transaction);

            DeliveryState resultantState;

            if(transactionId == null)
            {
                resultantState = (DeliveryState) outcome;
            }
            else
            {
                TransactionalState transactionalState = new TransactionalState();
                transactionalState.setOutcome(outcome);
                transactionalState.setTxnId(transactionId);
                resultantState = transactionalState;

            }


            boolean settled = transaction instanceof AutoCommitTransaction && ReceiverSettleMode.FIRST.equals(getReceivingSettlementMode());

            final Binary deliveryTag = xfr.getDeliveryTag();

            if(!settled)
            {
                _unsettledMap.put(deliveryTag, outcome);
            }
View Full Code Here

Examples of org.apache.qpid.management.domain.model.type.Binary

     */
    public final void process (Decoder decoder, int sequenceNumber)
    {     
        String packageName = decoder.readStr8();
        String className = decoder.readStr8();
        Binary classHash = new Binary(decoder.readBin128());
   
        long timeStampOfCurrentSample = decoder.readDatetime();
        long timeObjectWasCreated = decoder.readDatetime();
        long timeObjectWasDeleted = decoder.readDatetime();
       
        Binary objectId = new Binary(decoder.readBin128());
               
        if (objectHasBeenRemoved(timeObjectWasDeleted, timeStampOfCurrentSample))
        {
            removeObjectInstance(packageName,className,classHash,objectId);
        } else
View Full Code Here

Examples of org.apache.qpid.proton.amqp.Binary

            {
               message.getBodyBuffer().writeNullableString((String) value);
            }
            else if (value instanceof Binary)
            {
               Binary binary = (Binary) value;
               message.getBodyBuffer().writeBytes(binary.getArray());
            }
         }
         else if(section instanceof Data)
         {
            message.getBodyBuffer().writeBytes(((Data)section).getValue().getArray());
View Full Code Here

Examples of org.apache.qpid.proton.amqp.Binary

         {
            properties.setTo(message.getAddress().toString());
         }
         if (typedProperties.containsProperty(USER_ID_SS))
         {
            properties.setUserId(new Binary(typedProperties.getBytesProperty(USER_ID_SS)));
         }
         if (typedProperties.containsProperty(SUBJECT_SS))
         {
            properties.setSubject(typedProperties.getSimpleStringProperty(SUBJECT_SS).toString());
         }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.Binary

         Integer type = message.getIntProperty(MESSAGE_TYPE);
         switch (type)
         {
            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

Examples of org.apache.qpid.proton.amqp.Binary

      Object action = ((AmqpValue) msg.getBody()).getValue();
      if (action instanceof Declare)
      {
         Transaction tx = protonSession.getServerSession().getCurrentTransaction();
         Declared declared = new Declared();
         declared.setTxnId(new Binary(longToBytes(tx.getID())));
         delivery.disposition(declared);
         delivery.settle();
      }
      else if (action instanceof Discharge)
      {
View Full Code Here

Examples of org.apache.qpid.proton.type.Binary

        public Binary readValue()
        {
            int size = getDecoder().readRawInt();
            byte[] data = new byte[size];
            getDecoder().readRaw(data, 0, size);
            return new Binary(data);
        }
View Full Code Here

Examples of org.apache.qpid.proton.type.Binary

        public Binary readValue()
        {
            int size = ((int)getDecoder().readRawByte()) & 0xff;
            byte[] data = new byte[size];
            getDecoder().readRaw(data, 0, size);
            return new Binary(data);
        }
View Full Code Here

Examples of org.apache.qpid.proton.type.Binary

    final public int send(byte[] bytes, int offset, int size)
    {
        byte[] data = new byte[size];
        System.arraycopy(bytes, offset, data, 0, size);
        setChallengeResponse(new Binary(data));
        return size;
    }
View Full Code Here

Examples of org.apache.qpid.proton.type.Binary

        byte[] passwordBytes = password.getBytes();
        byte[] data = new byte[usernameBytes.length+passwordBytes.length+2];
        System.arraycopy(usernameBytes, 0, data, 1, usernameBytes.length);
        System.arraycopy(passwordBytes, 0, data, 2+usernameBytes.length, passwordBytes.length);

        setChallengeResponse(new Binary(data));

    }
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.