本文整理了Java中com.netflix.discovery.shared.Application.setName()
方法的一些代码示例,展示了Application.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.setName()
方法的具体详情如下:
包路径:com.netflix.discovery.shared.Application
类名称:Application
方法名:setName
[英]Sets the name of the application.
[中]设置应用程序的名称。
代码示例来源:origin: Netflix/eureka
switch(field) {
case NAME:
application.setName(jp.getText());
break;
case INSTANCE:
代码示例来源:origin: Netflix/eureka
@Override
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
Application app = new Application();
while (reader.hasMoreChildren()) {
reader.moveDown();
String nodeName = reader.getNodeName();
if (ELEM_NAME.equals(nodeName)) {
app.setName(reader.getValue());
} else if (NODE_INSTANCE.equals(nodeName)) {
app.addInstance((InstanceInfo) context.convertAnother(app,
InstanceInfo.class));
}
reader.moveUp();
}
return app;
}
}
代码示例来源:origin: com.netflix.eureka/eureka-client
switch(field) {
case NAME:
application.setName(jp.getText());
break;
case INSTANCE:
代码示例来源:origin: com.netflix.eureka/eureka-client
@Override
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
Application app = new Application();
while (reader.hasMoreChildren()) {
reader.moveDown();
String nodeName = reader.getNodeName();
if (ELEM_NAME.equals(nodeName)) {
app.setName(reader.getValue());
} else if (NODE_INSTANCE.equals(nodeName)) {
app.addInstance((InstanceInfo) context.convertAnother(app,
InstanceInfo.class));
}
reader.moveUp();
}
return app;
}
}
内容来源于网络,如有侵权,请联系作者删除!