docs: boolean buildTransmission(WsByteBuffer xmitBuffer)
     {
        if (tc.isEntryEnabled()) SibTr.entry(this, tc, "buildTransmission", xmitBuffer);
        SIErrorException error = null;
        
        while(!exhausedXmitBuffer && !transmissionBuilt && (error == null))
        {
           if (tc.isDebugEnabled()) SibTr.debug(this, tc, "state="+state+" layout="+layout);
           switch(state)
           {
              case(STATE_BUILDING_PRIMARY_HEADER):
                 if (buildHeader(primaryHeaderFields, xmitBuffer))
                 {
                    if (layout == JFapChannelConstants.XMIT_PRIMARY_ONLY)        state = STATE_BUILDING_PAYLOAD;
                    else if (layout == JFapChannelConstants.XMIT_CONVERSATION)   state = STATE_BUILDING_CONVERSATION_HEADER;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_START)  state = STATE_BUILDING_CONVERSATION_HEADER;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_MIDDLE) state = STATE_BUILDING_CONVERSATION_HEADER;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_END)    state = STATE_BUILDING_CONVERSATION_HEADER;
                    else
                    {
                       if (tc.isDebugEnabled()) SibTr.debug(this, tc, "unexpected layout: "+layout+" in state: "+state);
                       state = STATE_ERROR;
                       error = new SIErrorException("unexpected layout: "+layout+" in state: "+state);
                    }
                 }
                 break;
              case(STATE_BUILDING_CONVERSATION_HEADER):
                 if (buildHeader(conversationHeaderFields, xmitBuffer))
                 {
                    if (layout == JFapChannelConstants.XMIT_CONVERSATION)        state = STATE_BUILDING_PAYLOAD;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_START)  state = STATE_BUILDING_SEGMENT_HEADER;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_MIDDLE) state = STATE_BUILDING_PAYLOAD;
                    else if (layout == JFapChannelConstants.XMIT_SEGMENT_END)    state = STATE_BUILDING_PAYLOAD;
                    else
                    {
                       if (tc.isDebugEnabled()) SibTr.debug(this, tc, "unexpected layout: "+layout+" in state: "+state);
                       state = STATE_ERROR;
                       error = new SIErrorException("unexpected layout: "+layout+" in state: "+state);
                    }                  
                 }
                 break;
              case(STATE_BUILDING_SEGMENT_HEADER):
                 if (buildHeader(segmentedTransmissionHeaderFields, xmitBuffer))
                 {
                    if (layout == JFapChannelConstants.XMIT_SEGMENT_START)  state = STATE_BUILDING_PAYLOAD;
                    else
                    {
                       if (tc.isDebugEnabled()) SibTr.debug(this, tc, "unexpected layout: "+layout+" in state: "+state);
                       state = STATE_ERROR;
                       error = new SIErrorException("unexpected layout: "+layout+" in state: "+state);
                    }                  
                 }
                 break;
              case(STATE_BUILDING_PAYLOAD):
                 if (buildPayload(xmitBuffer))
                 {
                    transmissionBuilt = true;
                    state = STATE_BUILDING_PRIMARY_HEADER;
                    currentXmitDataBufferIndex = 0;
                    headerScratchSpace.clear();
                 }
                 break;
              case(STATE_ERROR):
                 if (error == null) error = new SIErrorException("Entered error state without exception been set");
                 connection.invalidate(true, error, "error building transmission");   // D224570
                 break;
              default:
           }
        }
        
        boolean retValue = transmissionBuilt;
        if (transmissionBuilt)
           transmissionBuilt = false;
        exhausedXmitBuffer = false;
        
        if (tc.isEntryEnabled()) SibTr.entry(this, tc, "buildTransmission", ""+retValue);
        return retValue;
     }