Interface ServiceRegistryRegistration<S>
- Type Parameters:
S- the type of the service.
- All Superinterfaces:
Named, jakarta.inject.Provider<S>
A registration for a service in a service registration.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanGet if this registration is the default registration for the service.voidMarks this registration as the default for the service type.Get an instance of the service implementation represented by this registration.Get the service type that this registration is associated with.booleanUnregisters this registration.booleanvalid()Get if this registration is still valid, which means that this registration was not unregistered yet.Methods inherited from interface jakarta.inject.Provider
get
-
Method Details
-
serviceType
-
serviceInstance
-
defaultService
boolean defaultService()Get if this registration is the default registration for the service.- Returns:
- true if this registration is the default for the service, false otherwise.
-
markAsDefaultService
void markAsDefaultService()Marks this registration as the default for the service type.- Throws:
IllegalStateException- if this registration is no longer valid.
-
valid
boolean valid()Get if this registration is still valid, which means that this registration was not unregistered yet.- Returns:
- true if this registration is still valid, false otherwise.
-
unregister
boolean unregister()Unregisters this registration.- Returns:
- true if this registration was unregistered, false otherwise.
-