final JsJmsMessage createInboundJmsMessage(JsMsgObject jmo, int messageType) {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())SibTr.entry(tc, "createInboundJmsMessage " + messageType );

    JsJmsMessage jmsMessage = null;

    switch (messageType) {

      case JmsBodyType.BYTES_INT:
        jmsMessage = new JsJmsBytesMessageImpl(jmo);
        break;

      case JmsBodyType.MAP_INT:
        jmsMessage = new JsJmsMapMessageImpl(jmo);
        break;

      case JmsBodyType.OBJECT_INT:
        jmsMessage = new JsJmsObjectMessageImpl(jmo);
        break;

      case JmsBodyType.STREAM_INT:
        jmsMessage = new JsJmsStreamMessageImpl(jmo);
        break;

      case JmsBodyType.TEXT_INT:
        jmsMessage = new JsJmsTextMessageImpl(jmo);
        break;

      default:
        jmsMessage = new JsJmsMessageImpl(jmo);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())SibTr.exit(tc, "createInboundJmsMessage");
    return jmsMessage;
  }
final JsJmsMessage createInboundJmsMessage ( JsMsgObject jmo , int messageType ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createInboundJmsMessage " + messageType ) ; JsJmsMessage jmsMessage = null ; switch ( messageType ) { case JmsBodyType . BYTES_INT : jmsMessage = new JsJmsBytesMessageImpl ( jmo ) ; break ; case JmsBodyType . MAP_INT : jmsMessage = new JsJmsMapMessageImpl ( jmo ) ; break ; case JmsBodyType . OBJECT_INT : jmsMessage = new JsJmsObjectMessageImpl ( jmo ) ; break ; case JmsBodyType . STREAM_INT : jmsMessage = new JsJmsStreamMessageImpl ( jmo ) ; break ; case JmsBodyType . TEXT_INT : jmsMessage = new JsJmsTextMessageImpl ( jmo ) ; break ; default : jmsMessage = new JsJmsMessageImpl ( jmo ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createInboundJmsMessage" ) ; return jmsMessage ; }
Create an instance of the appropriate sub-class, e.g. JsJmsTextMessage
if the inbound message is actually a JMS Text Message, for the
given JMO.

@return JsJmsMessage A JsJmsMessage of the appropriate subtype