public JsTopicMessageController getJsTopicMessageController ( String topic ) { logger . debug ( "Looking for messageController for topic '{}'" , topic ) ; JsTopicMessageController messageController = messageControllerCache . loadFromCache ( topic ) ; if ( null == messageController ) { // not in cache messageController = getJsTopicMessageControllerFromJsTopicControl ( topic ) ; // get from JsTopicControl if ( null == messageController ) { messageController = getJsTopicMessageControllerFromJsTopicControls ( topic ) ; // get from JsTopicControls if ( null == messageController ) { messageController = new DefaultJsTopicMessageController ( ) ; } } messageControllerCache . saveToCache ( topic , messageController . getClass ( ) ) ; // save in cache } return messageController ; }
Get jstopic message controller