public SIBusMessage next ( ) throws SISessionUnavailableException , SISessionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIBrowserSession . tc . isEntryEnabled ( ) ) SibTr . entry ( CoreSPIBrowserSession . tc , "next" , this ) ; JsMessage msg = null ; synchronized ( this ) { //Check that the session is not closed, if it is throw an exception checkNotClosed ( ) ; //if the browse cursor is null - it was pub sub - this //session will never return any messages if ( _browseCursor != null ) { try { //Get the next item from the browseCursor and cast it //to a SIMPMessage msg = _browseCursor . next ( ) ; } catch ( SISessionDroppedException e ) { // MessageStoreException shouldn't occur so FFDC. FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.BrowserSessionImpl.next" , "1:265:1.78.1.7" , this ) ; close ( ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.BrowserSessionImpl" , "1:274:1.78.1.7" , e } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIBrowserSession . tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIBrowserSession . tc , "next" , e ) ; throw e ; } catch ( SIResourceException e ) { // MessageStoreException shouldn't occur so FFDC. FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.BrowserSessionImpl.next" , "1:287:1.78.1.7" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.BrowserSessionImpl" , "1:294:1.78.1.7" , e } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIBrowserSession . tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIBrowserSession . tc , "next" , e ) ; throw e ; } } //end if } //end sync if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIBrowserSession . tc , "next" , msg ) ; return msg ; }
Gets the next item from the BrowseCursor .