Package io.smallrye.stork.api
Class ServiceDefinition
- java.lang.Object
-
- io.smallrye.stork.api.ServiceDefinition
-
public class ServiceDefinition extends Object
Define a service that will be managed by Stork.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigWithTypegetLoadBalancer()ConfigWithTypegetServiceDiscovery()ConfigWithTypegetServiceRegistrar()static ServiceDefinitionof(ConfigWithType sd)Creates a newServiceDefinitionusing the givenConfigWithType.static ServiceDefinitionof(ConfigWithType sd, ConfigWithType lb)Creates a newServiceDefinitionusing the givenConfigWithType.static ServiceDefinitionof(ConfigWithType sd, ConfigWithType lb, ConfigWithType sr)
-
-
-
Method Detail
-
of
public static ServiceDefinition of(ConfigWithType sd)
Creates a newServiceDefinitionusing the givenConfigWithType.- Parameters:
sd- the service discovery config, must not benull- Returns:
- the created service definition
-
of
public static ServiceDefinition of(ConfigWithType sd, ConfigWithType lb, ConfigWithType sr)
- Parameters:
sd- the service discovery config, must not benulllb- the load balancer config, ifnull, round-robin is used.sr- the service registrar config, must not benull- Returns:
- the created service definition
-
of
public static ServiceDefinition of(ConfigWithType sd, ConfigWithType lb)
Creates a newServiceDefinitionusing the givenConfigWithType.- Parameters:
sd- the service discovery config, must not benulllb- the load balancer config, ifnull, round-robin is used.- Returns:
- the created service definition
-
getLoadBalancer
public ConfigWithType getLoadBalancer()
- Returns:
- the configured load balancer config.
-
getServiceDiscovery
public ConfigWithType getServiceDiscovery()
- Returns:
- the configured service discovery config.
-
getServiceRegistrar
public ConfigWithType getServiceRegistrar()
- Returns:
- the configured service discovery config.
-
-