The temporal dependency handlerRegular service dependencies participate to the instance lifecycle. Moreover, the injected service object is either available or not available. A temporal dependency handler is a little different and provides a different resolution pattern. Indeed, the temporal dependency does not invalidate the instance. Moreover, if not available, the temporal dependency waits (and so blocks the current thread) for a provider. Of course, the maximum waiting time can be specified. If a timeout occurs, the handler throws a runtime exception. Using the handlerFirst of all, you need to configure the component type to use the handler such as: <iPOJO xmlns:temporal="org.apache.felix.ipojo.handler.temporal"> <component className="org.apache.felix.ipojo.example.Temporal"> <!-—Temporal dependency configuration --> <temporal:requires field="mytemporal" /> <provides /> </component> </iPOJO> Notice that, this handler is an external handler. So, it uses the "org.apache.felix.ipojo.handler.temporal" namespace. ConfigurationThe handler has only one mandatory attributes:
The handler supports on specific optional attributes:
The attribute form regular dependencies are also supported. DownloadThe handler is available on the download page. |
OverviewGetting StartedUser GuideToolsDeveloper GuideMisc & Contact
|