public boolean isSmResumptionPossible ( ) { // There is no resumable stream available if ( smSessionId == null ) return false ; final Long shutdownTimestamp = packetWriter . shutdownTimestamp ; // Seems like we are already reconnected, report true if ( shutdownTimestamp == null ) { return true ; } // See if resumption time is over long current = System . currentTimeMillis ( ) ; long maxResumptionMillies = ( ( long ) getMaxSmResumptionTime ( ) ) * 1000 ; if ( current > shutdownTimestamp + maxResumptionMillies ) { // Stream resumption is *not* possible if the current timestamp is greater then the greatest timestamp where // resumption is possible return false ; } else { return true ; } }
Returns true if the stream is resumable .