- All Known Subinterfaces:
Context
,DefaultContext
,Router
,ServiceRegistry
- All Known Implementing Classes:
ForwardingContext
,Jooby
public interface Registry
Service locator pattern which may be provided by a dependency injection framework.
- Since:
- 2.0.0
- Author:
- edgar
- See Also:
-
Method Summary
-
Method Details
-
require
Provides an instance of the given type.- Type Parameters:
T
- Object type.- Parameters:
type
- Object type.- Returns:
- Instance of this type.
- Throws:
RegistryException
- If there was a runtime failure while providing an instance.
-
require
Provides an instance of the given type where name matches it.- Type Parameters:
T
- Object type.- Parameters:
type
- Object type.name
- Object name.- Returns:
- Instance of this type.
- Throws:
RegistryException
- If there was a runtime failure while providing an instance.
-
require
Provides an instance of the given type.- Type Parameters:
T
- Object type.- Parameters:
key
- Object key.- Returns:
- Instance of this type.
- Throws:
RegistryException
- If there was a runtime failure while providing an instance.
-