Package io.debezium.service
Class ServiceRegistration<T extends Service>
java.lang.Object
io.debezium.service.ServiceRegistration<T>
Describes a registration for a specific service.
- Author:
- Chris Cranford
-
Field Summary
-
Constructor Summary
ConstructorDescriptionServiceRegistration
(ServiceProvider<T> serviceProvider) Create a service registration where the service will be initialized on first-use.ServiceRegistration
(Class<T> serviceClass, T service) Create a service registration for an already existing service instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the service instance.Get the service class typeGet the service providervoid
setService
(T service) Set the service once initialized, used byServiceProvider
registrations.
-
Field Details
-
serviceClass
-
serviceProvider
-
service
-
-
Constructor Details
-
ServiceRegistration
Create a service registration for an already existing service instance.- Parameters:
serviceClass
- the service classservice
- the service instance
-
ServiceRegistration
Create a service registration where the service will be initialized on first-use.- Parameters:
serviceProvider
- the service provider
-
-
Method Details
-
getServiceClass
Get the service class type- Returns:
- the class type, never
null
-
getServiceProvider
Get the service provider- Returns:
- the service provider, may be
null
-
getService
Get the service instance.- Returns:
- the service instance, may be
null
if initialized
-
setService
Set the service once initialized, used byServiceProvider
registrations.- Parameters:
service
- the service instance, should not benull
-