• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Registration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.cloud.client.serviceregistry.Registration的典型用法代码示例。如果您正苦于以下问题:Java Registration类的具体用法?Java Registration怎么用?Java Registration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Registration类属于org.springframework.cloud.client.serviceregistry包,在下文中一共展示了Registration类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getRegistration

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Bean public Registration getRegistration() {
	return new Registration() {
		@Override
		public String getServiceId() {
			return "from-registration";
		}

		@Override
		public String getHost() {
			return null;
		}

		@Override
		public int getPort() {
			return 0;
		}

		@Override
		public boolean isSecure() {
			return false;
		}

		@Override
		public URI getUri() {
			return null;
		}

		@Override
		public Map<String, String> getMetadata() {
			return null;
		}
	};
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-sleuth,代码行数:34,代码来源:DefaultEndpointLocatorConfigurationTest.java


示例2: DefaultEndpointLocator

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
public DefaultEndpointLocator(Registration registration, ServerProperties serverProperties,
		Environment environment, ZipkinProperties zipkinProperties, InetUtils inetUtils) {
	this.registration = registration;
	this.serverProperties = serverProperties;
	this.environment = environment;
	this.zipkinProperties = zipkinProperties;
	if (inetUtils == null) {
		this.inetUtils = new InetUtils(new InetUtilsProperties());
	} else {
		this.inetUtils = inetUtils;
	}
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-sleuth,代码行数:13,代码来源:DefaultEndpointLocator.java


示例3: registration

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Bean
Registration registration() {
	return new Registration() {
		@Override
		public String getServiceId() {
			return "testRegistration1";
		}

		@Override
		public String getHost() {
			return null;
		}

		@Override
		public int getPort() {
			return 0;
		}

		@Override
		public boolean isSecure() {
			return false;
		}

		@Override
		public URI getUri() {
			return null;
		}

		@Override
		public Map<String, String> getMetadata() {
			return null;
		}
	};
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:35,代码来源:ServiceRegistryEndpointTests.java


示例4: testLocalServiceExceptionIgnored

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Test
public void testLocalServiceExceptionIgnored() {
	given(this.discovery.getServices()).willReturn(Collections.<String>emptyList());

	DiscoveryClientRouteLocator routeLocator = new DiscoveryClientRouteLocator("/",
			this.discovery, this.properties, (Registration)null);

	// if no exception is thrown in constructor, this is a success
	routeLocator.locateRoutes();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:11,代码来源:DiscoveryClientRouteLocatorTests.java


示例5: setRegistration

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Autowired(required = false)
public void setRegistration(Registration registration) {
    this.registration = registration;
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:5,代码来源:CacheConfiguration.java


示例6: should_throw_exception_when_no_registration_is_present

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void should_throw_exception_when_no_registration_is_present() throws Exception {
	new ServiceInstanceHostLocator((Registration)null, new ZipkinProperties());
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-sleuth,代码行数:5,代码来源:ServiceInstanceHostLocatorTest.java


示例7: registration

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Bean public Registration registration() {
	return Mockito.mock(Registration.class);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-sleuth,代码行数:4,代码来源:ServiceInstanceHostLocatorConfigurationTest.java


示例8: setRegistration

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
public void setRegistration(Registration registration) {
	this.registration = registration;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:4,代码来源:ServiceRegistryEndpoint.java


示例9: setStatus

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Override
public void setStatus(Registration registration, String status) {
	updatedStatus.compareAndSet(null, status);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:5,代码来源:ServiceRegistryEndpointTests.java


示例10: getStatus

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Override
public Object getStatus(Registration registration) {
	return MYSTATUS;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:5,代码来源:ServiceRegistryEndpointTests.java


示例11: testIgnoredLocalServiceByDefault

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Test
public void testIgnoredLocalServiceByDefault() {
	given(this.discovery.getServices())
			.willReturn(Collections.singletonList(MYSERVICE));
	Registration registration = new Registration() {
		@Override
		public String getServiceId() {
			return MYSERVICE;
		}

		@Override
		public String getHost() {
			return "localhost";
		}

		@Override
		public int getPort() {
			return 80;
		}

		@Override
		public boolean isSecure() {
			return false;
		}

		@Override
		public URI getUri() {
			return null;
		}

		@Override
		public Map<String, String> getMetadata() {
			return null;
		}
	};

	DiscoveryClientRouteLocator routeLocator = new DiscoveryClientRouteLocator("/",
			this.discovery, this.properties, registration);

	LinkedHashMap<String, ZuulRoute> routes = routeLocator.locateRoutes();
	ZuulRoute actual = routes.get("/**");
	assertNull("routes didn't ignore " + MYSERVICE, actual);

	List<Route> routesMap = routeLocator.getRoutes();
	assertNotNull("routesMap was null", routesMap);
	assertTrue("routesMap was empty", routesMap.isEmpty());
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:48,代码来源:DiscoveryClientRouteLocatorTests.java


示例12: register

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Override
public void register(Registration registration) {

}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:5,代码来源:ServiceRegistryEndpointTests.java


示例13: deregister

import org.springframework.cloud.client.serviceregistry.Registration; //导入依赖的package包/类
@Override
public void deregister(Registration registration) {

}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:5,代码来源:ServiceRegistryEndpointTests.java



注:本文中的org.springframework.cloud.client.serviceregistry.Registration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MimeType类代码示例发布时间:2022-05-22
下一篇:
Java PermissionCallback类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap