Package org.codehaus.activemq.util

Examples of org.codehaus.activemq.util.BitArray.reset()


    public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        ActiveMQMessage msg = (ActiveMQMessage) packet;
        byte[] payload = msg.getBodyAsBytes();
       
        BitArray ba = msg.getBitArray();
        ba.reset();
       
        ba.set(ActiveMQMessage.CORRELATION_INDEX, msg.getJMSCorrelationID() != null);
        ba.set(ActiveMQMessage.TYPE_INDEX, msg.getJMSType() != null);
        ba.set(ActiveMQMessage.BROKER_NAME_INDEX, msg.getEntryBrokerName() != null);
        ba.set(ActiveMQMessage.CLUSTER_NAME_INDEX, msg.getEntryClusterName() != null);
View Full Code Here


       
      
        Object[] visited = ack.getBrokersVisited();
        boolean writeVisited = visited != null && visited.length > 0;
        BitArray ba = ack.getBitArray();
        ba.reset();
        ba.set(AbstractPacket.RECEIPT_REQUIRED_INDEX, ack.isReceiptRequired());
        ba.set(AbstractPacket.BROKERS_VISITED_INDEX,writeVisited);
        ba.set(MessageAck.MESSAGE_READ_INDEX, ack.isMessageRead());
        ba.set(MessageAck.TRANSACTION_ID_INDEX, ack.isPartOfTransaction());
        ba.set(MessageAck.XA_TRANS_INDEX, ack.isXaTransacted());
View Full Code Here

       
      
        Object[] visited = ack.getBrokersVisited();
        boolean writeVisited = visited != null && visited.length > 0;
        BitArray ba = ack.getBitArray();
        ba.reset();
        ba.set(AbstractPacket.RECEIPT_REQUIRED_INDEX, ack.isReceiptRequired());
        ba.set(AbstractPacket.BROKERS_VISITED_INDEX,writeVisited);
        ba.set(MessageAck.MESSAGE_READ_INDEX, ack.isMessageRead());
        ba.set(MessageAck.TRANSACTION_ID_INDEX, ack.isPartOfTransaction());
        ba.set(MessageAck.XA_TRANS_INDEX, ack.isXaTransacted());
View Full Code Here

        msg.setExternalMessageId(externalMessageId);
       
        ActiveMQDestination destination = msg.getJMSActiveMQDestination();
        ByteArray payload = msg.getBodyAsBytes();
        BitArray ba = msg.getBitArray();
        ba.reset();
        boolean cachingEnabled = wireFormat.isCachingEnabled();
        boolean cachingDestination = cachingEnabled && destination != null && !destination.isOrdered() && !destination.isExclusive();
        boolean longSequence = msg.getSequenceNumber() > Integer.MAX_VALUE;
       
        ba.set(AbstractPacket.RECEIPT_REQUIRED_INDEX, packet.isReceiptRequired());
View Full Code Here

    public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        ActiveMQMessage msg = (ActiveMQMessage) packet;
        byte[] payload = msg.getBodyAsBytes();
       
        BitArray ba = msg.getBitArray();
        ba.reset();
        writeUTF(msg.getId(),dataOut);
        ba.set(AbstractPacket.RECEIPT_REQUIRED_INDEX, packet.isReceiptRequired());
        Object[] visited = msg.getBrokersVisited();
        boolean writeVisited = visited != null && visited.length > 0;
        ba.set(AbstractPacket.BROKERS_VISITED_INDEX,writeVisited);
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.