com.netflix.discovery.shared.Application.setName()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中com.netflix.discovery.shared.Application.setName()方法的一些代码示例,展示了Application.setName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.setName()方法的具体详情如下:
包路径:com.netflix.discovery.shared.Application
类名称:Application
方法名:setName

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;
  }
}

相关文章