import BytesRowsMap from "./file.map" ; import SearchUpdatesPostman from "./postman" ; export default class State { public map : BytesRowsMap ; public postman : SearchUpdatesPostman ; private _streamId : string ; private _searchFile : string ; private _streamFile : string ; private _requests : RegExp [ ] = [ ] ; constructor ( streamId , streamFile , searchFile ) { this . _streamId = streamId ; this . _searchFile = searchFile ; this . _streamFile = streamFile ; this . map = new BytesRowsMap ( ) ; this . postman = new SearchUpdatesPostman ( this . _streamId , this . map , this . hasActiveRequests . bind ( this ) ) ; } public getStreamFile ( ) { return this . _streamFile ; } public getSearchFile ( ) { return this . _searchFile ; } public getGuid ( ) { return this . _streamId ; } public setRequests ( requests ) { this . _requests = requests ; } public getRequests ( ) { return this . _requests ; } public hasActiveRequests ( ) { return this . _requests . length > 0 ; } }