public JsMessage transcribeToJmf ( ) throws MessageCopyFailedException , IncorrectMessageTypeException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "transcribeToJmf" ) ; JsMsgObject newJmo = null ; // Try/catch block in case we get an MFPUnsupportedEncodingRuntimeException because the // payload is in an unsupported codepage. d252277.2 try { if ( this instanceof JsJmsMessageImpl ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Transcribing from JsJmsMessageImpl" ) ; newJmo = jmo . transcribeToJmf ( ) ; } else { // Non-JMS messages are not supported - they should have been converted into JMS by now if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Non-JMS Messages are not yet supported" ) ; String exString = nls . getFormattedMessage ( "UNEXPECTED_MESSAGE_TYPE_CWSIF0102" , new Object [ ] { getJsMessageType ( ) , MessageType . JMS } , "The Message can not be represented as a pure JMF Message" ) ; throw new IncorrectMessageTypeException ( exString ) ; } } catch ( MFPUnsupportedEncodingRuntimeException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.mfp.impl.JsMessageImpl.transcribeToJmf" , "721" ) ; // Throw the original UnsupportedEncodingException throw ( UnsupportedEncodingException ) e . getCause ( ) ; } JsMessage newMsg ; // if we have a new jmo, create a new message from it if ( newJmo != this . jmo ) { newMsg = createNewGeneralized ( newJmo ) ; } // otherwise, just return ourself else { newMsg = this ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "transcribeToJmf" , newMsg ) ; return newMsg ; }
Transcribe this message to pure JMF