Commit Graph

10 Commits (9b915b3d36382b19b2717a1858a4178e70cabeaf)

Author SHA1 Message Date
Nelson R. Perez 9418ed2b1e Fixing problems with the NetworkServiceManager
- Removed the 'mStartingService' boolean flag from the NetworkServiceManager.
- Introducing the 'passInfo' flag, used to decide whether or not to pass the connection info to the NetworkService calling the 'bootstrapService' method.
2019-06-21 21:07:29 -05:00
Nelson R. Perez 562955586b Preventing a potential problem at the NetworkServiceManager and introducing some getters
- Preventing accidentally calling the 'bindService' twice at the NetworkServiceManager
- Providing a getter for the node list at the NodeLatencyVerifier
- Created a getter for the NodeLatencyVerifier at the NetworkService
2019-06-13 07:49:36 -05:00
Severiano Jaramillo c6cd21cdf0 Fix crash in NetworkService due to components other than NetworkServiceManager binding to the service without the proper initialization information. This initialization was moved to another method named bootstrapService which is only called from NetworkServiceManager after the NetworkService has been properly connected. 2018-11-06 11:36:11 -06:00
Nelson R. Perez 63eebf11c4 Exposing an interface that allows the fine tuning of the alpha parameter used to calculate the exponential moving average of measured latencies 2018-10-18 17:36:34 -05:00
Nelson R. Perez 3a19808ac5 Moved the node list information out of the library, this must be provided by the application now 2018-10-18 12:14:05 -05:00
Nelson R. Perez 857236a1ea Moved the service binding to the onActivityResumed callback 2018-10-02 12:36:36 -05:00
Nelson R. Perez 25b7e6c8c6 Adding a very high latency to nodes that fail their connection 2018-10-02 01:35:53 -05:00
Nelson R. Perez ede7265989 NodeLatencyVerifier
- Using an HttpUrl instance as a key to the map of FullNode instances, we were using simple String here before, but turned out not to be too reliable

NetworkService
- Introducing the NodeLatencyVerifier instance into the NetworkService, and making its use optional
- In case the user opts to use the node-latency verification, the initial connection is delayed until we obtain a measurement of all nodes
- Exposing a PublishSubject, this allows users of the library to get notified of the node latency measurements

NetworkServiceManager
- A boolean flag is now used to decide whether or not to start a NetworkService instance with the node-latency verification feature ON
2018-09-20 21:51:14 -05:00
Nelson R. Perez ccf61858e4 Modified the NetworkService and the NetworkServiceManager classes in order to pass arguments to the service via Intent extras and to allow delayed network connection 2018-09-19 16:44:26 -05:00
Nelson R. Perez 593d3fc0d8 - Moved the NetworkService management logic to the newly introduced NetworkServiceManager class 2018-05-31 15:52:26 -05:00