docs: private int sendChunkedMessage(SIBusMessage sibMessage)
        throws MessageCopyFailedException,
               IncorrectMessageTypeException,
               MessageEncodeFailedException,
               UnsupportedEncodingException
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "sendChunkedMessage", sibMessage);
  
        int msgLen = 0;
  
        // First of all we must encode the message ourselves
        CommsServerByteBuffer buffer = poolManager.allocate();
        ConversationState convState = (ConversationState) getConversation().getAttachment();
  
        try
        {
           List<DataSlice> messageSlices = buffer.encodeFast((JsMessage) sibMessage,
                                                             convState.getCommsConnection(),
                                                             getConversation());
  
           // Do a check on the size of the message. If it is less than our threshold, forget the
           // chunking and simply send the message as one
           for (DataSlice slice : messageSlices) msgLen += slice.getLength();
           if (msgLen < CommsConstants.MINIMUM_MESSAGE_SIZE_FOR_CHUNKING)
           {
              // The message is a tiddler, send it in one
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Message is smaller than " +
                                                             CommsConstants.MINIMUM_MESSAGE_SIZE_FOR_CHUNKING);
              sendEntireMessage(sibMessage, messageSlices);
           }
           else
           {
              short jfapPriority = JFapChannelConstants.getJFAPPriority(sibMessage.getPriority());
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Sending with JFAP priority of " + jfapPriority);
  
              // Now we have the slices, send each one in turn. Each slice contains all the header
              // information so that the client code knows what to do with the message
  
              for (int x = 0; x < messageSlices.size(); x++)
              {
                 DataSlice slice = messageSlices.get(x);
                 if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Sending slice:", slice);
  
                 boolean first = (x == 0);
                 boolean last = (x == (messageSlices.size() - 1));
                 byte flags = 0;
  
                 // Work out the flags to send
                 if (first) flags |= CommsConstants.CHUNKED_MESSAGE_FIRST;
                 if (last)  flags |= CommsConstants.CHUNKED_MESSAGE_LAST;
                 else if (!first) flags |= CommsConstants.CHUNKED_MESSAGE_MIDDLE;
                 if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Flags: " + flags);
  
                 if (!first)
                 {
                    // This isn't the first slice, grab a fresh buffer
                    buffer = poolManager.allocate();
                 }
  
                 // Now add all the header information
                 buffer.putShort(convState.getConnectionObjectId());
                 buffer.putShort(mainConsumer.getClientSessionId());
                 buffer.putShort(mainConsumer.getMessageBatchNumber());  // BIT16 Message batch
                 buffer.put(flags);
                 buffer.putDataSlice(slice);
  
                 getConversation().send(buffer,
                                        JFapChannelConstants.SEG_CHUNKED_PROXY_MESSAGE,
                                        0,                                         // No request number
                                        jfapPriority,
                                        false,
                                        ThrottlingPolicy.BLOCK_THREAD,
                                        INVALIDATE_CONNECTION_ON_ERROR);
              }
  
              messagesSent++;
           }
        }
        catch (SIException e)
        {
           FFDCFilter.processException(e,
                                       CLASS_NAME + ".sendChunkedMessage",
                                       CommsConstants.CATPROXYCONSUMER_SEND_CHUNKED_MSG_01,
                                       this);
  
           SibTr.error(tc, "COMMUNICATION_ERROR_SICO2014", e);
           msgLen = 0;
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "sendChunkedMessage", msgLen);
        return msgLen;
     }