Package org.apache.qpid.proton.amqp

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


            TransportDelivery tpDelivery = new TransportDelivery(deliveryId, delivery, tpLink);
            delivery.setTransportDelivery(tpDelivery);

            final Transfer transfer = new Transfer();
            transfer.setDeliveryId(deliveryId);
            transfer.setDeliveryTag(new Binary(delivery.getTag()));
            transfer.setHandle(tpLink.getLocalHandle());

            if(delivery.isSettled())
            {
                transfer.setSettled(Boolean.TRUE);
View Full Code Here


        {
            buf = ByteBuffer.allocate(size);
            rval = encode(buf);
            size = size * 2;
        }
        return new Binary(buf.array(), buf.arrayOffset(), buf.arrayOffset()+(int)rval);
    }
View Full Code Here

    }

    @Override
    public void putBinary(final byte[] bytes)
    {
        putBinary(new Binary(bytes));
    }
View Full Code Here

    @ProtonCEquivalent("pn_data_get_binary")
    public Binary getBinary()
    {
        pn_bytes_t b = Proton.pn_data_get_binary(_impl);

        return b == null ? null : new Binary(Proton.pn_bytes_to_array(b));
    }
View Full Code Here

    private void dumpQueue(String msg)
    {
        System.out.print("  " + msg + "{");
        DeliveryImpl dlv = _connectionEndpoint.getTransportWorkHead();
        while (dlv != null) {
            System.out.print(new Binary(dlv.getTag()) + ", ");
            dlv = dlv.getTransportWorkNext();
        }
        System.out.println("}");
    }
View Full Code Here

            TransportDelivery tpDelivery = new TransportDelivery(deliveryId, delivery, tpLink);
            delivery.setTransportDelivery(tpDelivery);

            final Transfer transfer = new Transfer();
            transfer.setDeliveryId(deliveryId);
            transfer.setDeliveryTag(new Binary(delivery.getTag()));
            transfer.setHandle(tpLink.getLocalHandle());

            if(delivery.isSettled())
            {
                transfer.setSettled(Boolean.TRUE);
View Full Code Here

    private void decodeProperties()
    {
        _properties = new Properties();
        _properties.setMessageId(convert(Proton.pn_message_get_id(_impl)));
        _properties.setUserId(new Binary(Proton.pn_bytes_to_array(Proton.pn_message_get_user_id(_impl))));
        _properties.setTo(Proton.pn_message_get_address(_impl));
        _properties.setSubject(Proton.pn_message_get_subject(_impl));
        _properties.setReplyTo(Proton.pn_message_get_reply_to(_impl));
        _properties.setCorrelationId(convert(Proton.pn_message_get_correlation_id(_impl)));
        _properties.setContentType(Symbol.valueOf(Proton.pn_message_get_content_type(_impl)));
View Full Code Here

        Proton.pn_message_set_id(_impl, convertToAtom(noProperties ? null : _properties.getMessageId()));

        pn_bytes_t userId = new pn_bytes_t();;
        if(!noProperties && _properties.getUserId() != null)
        {
            final Binary binary = _properties.getUserId();
            byte[] bytes = new byte[binary.getLength()];
            System.arraycopy(binary.getArray(),binary.getArrayOffset(),bytes,0,binary.getLength());
            Proton.pn_bytes_from_array(userId, bytes);
        }

        Proton.pn_message_set_user_id(_impl, userId);
View Full Code Here

        {
            return null;
        }
        else
        {
            final Binary userId = _properties.getUserId();
            byte[] id = new byte[userId.getLength()];
            System.arraycopy(userId.getArray(),userId.getArrayOffset(),id,0,userId.getLength());
            return id;
        }

    }
View Full Code Here

            {
                _properties = new Properties();
            }
            byte[] id = new byte[userId.length];
            System.arraycopy(userId, 0, id,0, userId.length);
            _properties.setUserId(new Binary(id));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.proton.amqp.Binary

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.