tcalmant / ipopo

iPOPO: a Service-Oriented Component Model for Python
https://ipopo.readthedocs.io/
Apache License 2.0
69 stars 28 forks source link

Create a @Temporal handler #28

Closed tcalmant closed 10 years ago

tcalmant commented 10 years ago

It should act like the @Temporal handler of iPOJO.

It has the same signature as @Requires, but it behaves differently: when calling a dependency that has disappeared, the called will be paused until a new dependency is injected or a timeout exception will be raised.

tcalmant commented 10 years ago

First implementation has been pushed on the dev branch. Unit tests must be written, as well as some documentation.

Custom timeout is not yet implemented, the handler gives 10 seconds for a replacement service to come up.

tcalmant commented 10 years ago

Tests added in commit 65b88fbd44c4c88fc86ca9392a4321de90d04dea Custom timeout still to be added.

tcalmant commented 10 years ago

Custom timeout added in commit b3bce2c9d090a4da13b9e68f95f28ba0626df34b: the developer can give any strictly positive float as timeout. Timeout override added in commit 79da7d7cd247fdde834c39f3901695b48455bf03: the timeout given in a @Temporal decorator can be overridden by one given in the temporal.timeouts component property, at instantiation time.