public BaseMessage convertToThinMessage ( ) { int iChangeType = ( ( RecordMessageHeader ) this . getMessageHeader ( ) ) . getRecordMessageType ( ) ; // See if this record is currently displayed or buffered, if so, refresh and display. Object data = this . getData ( ) ; BaseMessage messageTableUpdate = null ; // NOTE: The only way I will send this message to the client is if the ModelMessageHandler.START_INDEX_PARAM has been added to this message by the TableSession // if (properties.get(ModelMessageHandler.START_INDEX_PARAM) != null) { BaseMessageHeader messageHeader = new SessionMessageHeader ( this . getMessageHeader ( ) . getQueueName ( ) , this . getMessageHeader ( ) . getQueueType ( ) , null , this ) ; messageTableUpdate = new MapMessage ( messageHeader , data ) ; messageTableUpdate . put ( MessageConstants . MESSAGE_TYPE_PARAM , Integer . toString ( iChangeType ) ) ; } return messageTableUpdate ; }
If you are sending a thick message to a thin client convert it first . Since BaseMessage is already so conversion is necessary ... return this message .