code: public String getMessageInfoType(BaseMessage externalMessage)
      {
          if (externalMessage != null)
              if (externalMessage.getMessageHeader() != null)
                  if (externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE) != null)
                      return (String)externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE);
          return MessageInfoTypeModel.REQUEST;   // Override this to check for sure.
      }
docs: Is this message a reply (or a request).
  @param externalMessage The incomming message.
  @return MessageType.MESSAGE_IN or MessageType.REPLY_IN If this is a reply.