本文整理了Java中org.jclouds.ovf.Network.builder()
方法的一些代码示例,展示了Network.builder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.builder()
方法的具体详情如下:
包路径:org.jclouds.ovf.Network
类名称:Network
方法名:builder
暂无
代码示例来源:origin: jclouds/legacy-jclouds
public void test() {
InputStream is = getClass().getResourceAsStream("/networksection.xml");
Injector injector = Guice.createInjector(new SaxParserModule());
Factory factory = injector.getInstance(ParseSax.Factory.class);
NetworkSection result = factory.create(injector.getInstance(NetworkSectionHandler.class)).parse(is);
assertEquals(result.toString(), NetworkSection.builder().info("List of logical networks used in the package")
.network(
Network.builder().name("red").description("The network the Red service is available on")
.build()).network(
Network.builder().name("blue").description("The network the Blue service is available on")
.build())
.build().toString()
);
}
}
代码示例来源:origin: apache/jclouds
public void test() {
InputStream is = getClass().getResourceAsStream("/networksection.xml");
Injector injector = Guice.createInjector(new SaxParserModule());
Factory factory = injector.getInstance(ParseSax.Factory.class);
NetworkSection result = factory.create(injector.getInstance(NetworkSectionHandler.class)).parse(is);
assertEquals(result.toString(), NetworkSection.builder().info("List of logical networks used in the package")
.network(
Network.builder().name("red").description("The network the Red service is available on")
.build()).network(
Network.builder().name("blue").description("The network the Blue service is available on")
.build())
.build().toString()
);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public void endElement(String uri, String localName, String qName) {
if (equalsOrSuffix(qName, "Info")) {
builder.info(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Description")) {
networkBuilder.description(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Network")) {
try {
builder.network(networkBuilder.build());
} finally {
networkBuilder = Network.builder();
}
}
super.endElement(uri, localName, qName);
}
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute
@Override
public void endElement(String uri, String localName, String qName) {
if (equalsOrSuffix(qName, "Info")) {
builder.info(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Description")) {
networkBuilder.description(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Network")) {
try {
builder.network(networkBuilder.build());
} finally {
networkBuilder = Network.builder();
}
}
super.endElement(uri, localName, qName);
}
}
代码示例来源:origin: org.apache.jclouds/jclouds-compute
@Override
public void endElement(String uri, String localName, String qName) {
if (equalsOrSuffix(qName, "Info")) {
builder.info(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Description")) {
networkBuilder.description(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Network")) {
try {
builder.network(networkBuilder.build());
} finally {
networkBuilder = Network.builder();
}
}
super.endElement(uri, localName, qName);
}
}
代码示例来源:origin: apache/jclouds
@Override
public void endElement(String uri, String localName, String qName) {
if (equalsOrSuffix(qName, "Info")) {
builder.info(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Description")) {
networkBuilder.description(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "Network")) {
try {
builder.network(networkBuilder.build());
} finally {
networkBuilder = Network.builder();
}
}
super.endElement(uri, localName, qName);
}
}
内容来源于网络,如有侵权,请联系作者删除!