code: public static short getJFAPPriority(Integer siBusMessagePriority)
      {
          short jfapPriority = (short) (siBusMessagePriority.intValue() + 2);
  
          // If the priority is higher than what we allow, return
          // the highest we can
          if (jfapPriority > PRIORITY_HIGH)
          {
              return PRIORITY_HIGH;
          }
          // If the priority is lower than what we allow, return
          // the lowest we can
          else if (jfapPriority < PRIORITY_LOW)
          {
              return PRIORITY_LOW;
          }
          // Otherwise return it
          else
          {
              return jfapPriority;
          }
      }
docs: Converts a SIBusMessage priority to a JFAP message priority
  so that the message can be sent with an equivalent priority.
  <p>
  If the priority is outside the range of the JFAP priority we
  will return either the highest (if it is above) or the lowest
  (if it is below).
  
  @param siBusMessagePriority The message priority to convert.
  @return Returns the JFAP message priority