Class EurekaStubsRegistrar
- java.lang.Object
-
- org.springframework.cloud.contract.stubrunner.spring.cloud.eureka.EurekaStubsRegistrar
-
- All Implemented Interfaces:
AutoCloseable,StubsRegistrar
public class EurekaStubsRegistrar extends Object implements StubsRegistrar
Registers all stubs in Eureka Service Discovery.- Since:
- 1.0.0
- Author:
- Marcin Grzejszczak
-
-
Constructor Summary
Constructors Constructor Description EurekaStubsRegistrar(StubRunning stubRunning, org.springframework.cloud.client.serviceregistry.ServiceRegistry<org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration> serviceRegistry, StubMapperProperties stubMapperProperties, org.springframework.cloud.commons.util.InetUtils inetUtils, org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean eurekaInstanceConfigBean, org.springframework.cloud.netflix.eureka.EurekaClientConfigBean eurekaClientConfigBean, org.springframework.context.ApplicationContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected StringhostName(Map.Entry<StubConfiguration,Integer> entry)protected intport(Map.Entry<StubConfiguration,Integer> entry)voidregisterStubs()
-
-
-
Constructor Detail
-
EurekaStubsRegistrar
public EurekaStubsRegistrar(StubRunning stubRunning, org.springframework.cloud.client.serviceregistry.ServiceRegistry<org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration> serviceRegistry, StubMapperProperties stubMapperProperties, org.springframework.cloud.commons.util.InetUtils inetUtils, org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean eurekaInstanceConfigBean, org.springframework.cloud.netflix.eureka.EurekaClientConfigBean eurekaClientConfigBean, org.springframework.context.ApplicationContext context)
-
-
Method Detail
-
registerStubs
public void registerStubs()
- Specified by:
registerStubsin interfaceStubsRegistrar
-
hostName
protected String hostName(Map.Entry<StubConfiguration,Integer> entry)
-
port
protected int port(Map.Entry<StubConfiguration,Integer> entry)
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-