docs: SIMPMessage getAttachedMessage() throws SIResourceException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "getAttachedMessage", this);
  
          SIMPMessage msg = null;
  
          //check if there really is a message attached
          if (_msgAttached)
          {
              // If the message wasn't locked when it was attached (we are a forwardScanning
              // consumer) we need to go and look for it now.
              if (_msgOnItemStream && !_msgLocked)
              {
                  // Attempt to lock the attached message on the itemstream
                  msg = getEligibleMsgLocked(null);
              }
              else
                  msg = _attachedMessage;
  
              //show that there is no longer an attached message available
              _msgAttached = false;
              _msgLocked = false;
              _attachedMessage = null;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "getAttachedMessage", msg);
  
          //simply return the attached message (if there is one)
          return msg;
      }