public void put(CommsByteBuffer msgBuffer, short msgBatch, boolean lastInBatch, boolean chunk)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", new Object[]{msgBuffer, msgBatch, lastInBatch, chunk});
      
      QueueData queueData = null;
      // If this data represents a chunk we need to read the flags from the buffer. This 
      // will indicate to us whether we need to create some new queue data to stash on the 
      // queue or 
      if (chunk)
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Dealing with a chunked message");
         
         // Get the flags from the buffer
         byte flags = msgBuffer.get();
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Flags:", ""+flags);
         
         // Is this the first chunk?
         if ((flags & CommsConstants.CHUNKED_MESSAGE_FIRST) == CommsConstants.CHUNKED_MESSAGE_FIRST)
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "First chunk received");
            
            // If it is, create some new queue data to place on the queue with the initial
            // chunk
            queueData = new QueueData(this, lastInBatch, chunk, msgBuffer);
            
            // Put the data to the queue
            queue.put(queueData, msgBatch);
         }
         else
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Middle / Last chunk received");
            
            // Otherwise, we need to append to the chunks already collected. We do this by
            // finding the chunk to append to. This will be the last message on the queue
            // (i.e. at the back). This works for all cases as an async consumer cannot be
            // driven concurrently (so the last incomplete message on the queue will be the
            // one we want).
            boolean lastChunk = ((flags & CommsConstants.CHUNKED_MESSAGE_LAST) == CommsConstants.CHUNKED_MESSAGE_LAST);
            queue.appendToLastMessage(msgBuffer, lastChunk);
         }
      }
      else
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Dealing with the entire message");
         
         queueData = new QueueData(this, lastInBatch, chunk, msgBuffer);
         
         // Put the data to the queue
         queue.put(queueData, msgBatch);
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "put");
   }
public void put ( CommsByteBuffer msgBuffer , short msgBatch , boolean lastInBatch , boolean chunk ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , new Object [ ] { msgBuffer , msgBatch , lastInBatch , chunk } ) ; QueueData queueData = null ; if ( chunk ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Dealing with a chunked message" ) ; byte flags = msgBuffer . get ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Flags:" , "" + flags ) ; if ( ( flags & CommsConstants . CHUNKED_MESSAGE_FIRST ) == CommsConstants . CHUNKED_MESSAGE_FIRST ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "First chunk received" ) ; queueData = new QueueData ( this , lastInBatch , chunk , msgBuffer ) ; queue . put ( queueData , msgBatch ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Middle / Last chunk received" ) ; boolean lastChunk = ( ( flags & CommsConstants . CHUNKED_MESSAGE_LAST ) == CommsConstants . CHUNKED_MESSAGE_LAST ) ; queue . appendToLastMessage ( msgBuffer , lastChunk ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Dealing with the entire message" ) ; queueData = new QueueData ( this , lastInBatch , chunk , msgBuffer ) ; queue . put ( queueData , msgBatch ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" ) ; }
Places a browse message on the queue.
@see com.ibm.ws.sib.comms.client.proxyqueue.ProxyQueue#put(com.ibm.ws.sib.comms.common.CommsByteBuffer, short, boolean, boolean)