Package io.hekate.core.service
Interface ServiceFactory<T extends Service>
-
- Type Parameters:
T
- Type of a service that is produced by this factory.
- All Known Implementing Classes:
ClusterServiceFactory
,CoordinationServiceFactory
,ElectionServiceFactory
,JmxServiceFactory
,LockServiceFactory
,MessagingServiceFactory
,NetworkServiceFactory
,ResourceServiceFactory
,RpcServiceFactory
public interface ServiceFactory<T extends Service>
Factory forservices
.This interface provides an abstraction of service configuration and construction. All service configuration options are expected to be exposed as setters/getters of a factory implementation class (see
NetworkServiceFactory
for example).Implementations of this interface can be registered via
HekateBootstrap.setServices(List)
method.- See Also:
DefaultServiceFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
createService()
Constructs a new service instance based on the configuration options of this factory.
-
-
-
Method Detail
-
createService
T createService()
Constructs a new service instance based on the configuration options of this factory.- Returns:
- New service instance.
-
-