private ClientSession newSession ( ) { ClientSession session = new ClientSession ( clientId , transport . client ( ) , selector , ioContext , connectionStrategy , sessionTimeout , unstabilityTimeout ) ; // Update the session change listener. if ( changeListener != null ) changeListener . close ( ) ; changeListener = session . onStateChange ( this :: onStateChange ) ; // Register all event listeners. eventListeners . forEach ( l -> l . register ( session ) ) ; return session ; }
Creates a new child session .