本文整理了Java中org.jclouds.ovf.Network
类的一些代码示例,展示了Network
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network
类的具体详情如下:
包路径:org.jclouds.ovf.Network
类名称:Network
暂无
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public boolean apply(Network input) {
return "none".equals(input.getName());
}
代码示例来源:origin: stackoverflow.com
private static Network INSTANCE = null;
private Network(){
}
static {
INSTANCE = new Network();
}
public static Network getInstance() {
return INSTANCE;
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute
public Builder fromNetwork(Network in) {
return name(in.getName()).description(in.getDescription());
}
}
代码示例来源:origin: stackoverflow.com
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView tv = (TextView)findViewById(R.id.text);
Network network = new Network();
network.postData(tv);
}
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws Exception {
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
try {
Network network = new Network();
network.changeConnection("connect");
// Do loads of work...
// All work has been done and we're done with the
// connection. Why don't we close it just now?
network.changeConnection("disconnect");
}
catch (Exception exc) {
// Catch the exception properly
}
}
});
t1.start();
}
代码示例来源: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: stackoverflow.com
final Network network = new Network();
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
System.out.println("Thread started...");
try {
network.changeConnection("connect");
}
catch (Exception ex) {
}
}
});
t1.start();
System.out.println("Thread start command executed...");
//Thread.sleep(20000);
while(t1.isAlive()){
//Do nothing...
}
network.changeConnection("disconnect");
代码示例来源:origin: org.apache.jclouds.api/vcloud
@Override
public boolean apply(Network input) {
return "none".equals(input.getName());
}
代码示例来源:origin: jclouds/legacy-jclouds
public Builder fromNetwork(Network in) {
return name(in.getName()).description(in.getDescription());
}
}
代码示例来源:origin: stackoverflow.com
new Thread(new Runnable(){
public void run() {
new Network().connect();
}
}).start();
代码示例来源: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.api/vcloud
@Override
public boolean apply(Network input) {
return "none".equals(input.getName());
}
代码示例来源:origin: org.apache.jclouds/jclouds-compute
public Builder fromNetwork(Network in) {
return name(in.getName()).description(in.getDescription());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public Network build() {
return new Network(name, description);
}
代码示例来源: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);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public String apply(VAppTemplate vAppTemplate) {
checkArgument(vAppTemplate != null, "vAppTemplate was null!");
Set<Network> networks = vAppTemplate.getNetworkSection().getNetworks();
checkArgument(networks.size() > 0, "no networks found in vAppTemplate %s", vAppTemplate);
if (networks.size() > 1)
logger.warn("multiple networks found for %s, choosing first from: %s", vAppTemplate.getName(), networks);
return get(networks, 0).getName();
}
}
代码示例来源:origin: apache/jclouds
public Builder fromNetwork(Network in) {
return name(in.getName()).description(in.getDescription());
}
}
代码示例来源:origin: org.apache.jclouds/jclouds-compute
public Network build() {
return new Network(name, description);
}
代码示例来源: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!