Module io.helidon.service.registry
Package io.helidon.service.registry
Annotation Interface Service.Contract
- Enclosing class:
Service
The
Contract
annotation is used to relay significance to the type that it annotates. While remaining optional in
its use, it is typically placed on an interface definition to signify that the given type can be used for lookup in the
service registry.
While normally placed on interface types, it can also be placed on abstract and concrete class as well. The main point is
that a Contract
is the focal point for service lookup.
If the developer does not have access to the source to place this annotation on the interface definition directly then
consider using Service.ExternalContracts
instead - this annotation can be placed on the
implementation class implementing the given Contract
interface(s).
Default behavior of the service registry is to only provide support lookup based on contracts.