AutoRenewStream<T>.fromStream constructor
AutoRenewStream<T>.fromStream (
- Stream<
T> initialStream, - StreamFactory<
T> streamFactory
Existing stream constructor.
In case you already have an initialStream
, you can use this constructor.
It will use the initialStream
as soon as listen is is called. Only
when this initial stream throws an AuthRevokedException, the
streamFactory is used to create a new one.
Implementation
AutoRenewStream.fromStream(Stream<T> initialStream, this.streamFactory)
: _initialStream = initialStream;