Package org.pipservices3.commons.refer
Interface IReferenceable
- All Known Implementing Classes:
DependencyResolver
public interface IReferenceable
Interface for components that depends on other components.
If component requires explicit notification to unset references
it shall additionally implement IUnreferenceable
interface.
### Example ###
public class MyController implements IReferenceable {
public IMyPersistence _persistence;
...
public void setReferences(IReferences references) {
this._persistence = (IMyPersistence)references.getOneRequired(
new Descriptor("mygroup", "persistence", "*", "*", "1.0")
);
}
...
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setReferences
(IReferences references) Sets references to dependent components.
-
Method Details
-
setReferences
Sets references to dependent components.- Parameters:
references
- references to locate the component dependencies.- Throws:
ReferenceException
- when no references found.ConfigException
- when configuration is wrong- See Also:
-