- All Known Implementing Classes:
DefaultOciCertificatesDownloader
,DefaultOciPrivateKeyDownloader
,HoconMpMetaConfigProvider
,YamlMetaConfigProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to define that this class is a class with priority.
One of the uses is for services loaded by a ServiceLoader.
A Prioritized
with lower priority number is more significant than a Prioritized
with a
higher priority number.
For cases where priority is the same, implementation must define ordering of such Prioritized
.
Negative priorities are not allowed and services using priorities should throw an
IllegalArgumentException
if such a priority is used (unless such a service
documents the specific usage of a negative priority)
A Prioritized
with priority 1
is more significant (will be returned before) priority 2
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default priority for any prioritized component (whether it implements this interface or usesjakarta.annotation.Priority
annotation. -
Method Summary
Modifier and TypeMethodDescriptionint
priority()
Priority of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation).
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYDefault priority for any prioritized component (whether it implements this interface or usesjakarta.annotation.Priority
annotation.- See Also:
-
-
Method Details
-
priority
int priority()Priority of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation). If not dynamic, you can use thejakarta.annotation.Priority
annotation rather then implementing this interface as long as it is supported by the library using thisPrioritized
.- Returns:
- the priority of this service, must be a non-negative number
-