本文整理汇总了Java中org.projectfloodlight.openflow.types.IPv4Address.toString方法的典型用法代码示例。如果您正苦于以下问题:Java IPv4Address.toString方法的具体用法?Java IPv4Address.toString怎么用?Java IPv4Address.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.projectfloodlight.openflow.types.IPv4Address
的用法示例。
在下文中一共展示了IPv4Address.toString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNetwork
import org.projectfloodlight.openflow.types.IPv4Address; //导入方法依赖的package包/类
@Override
public void createNetwork(String guid, String network, IPv4Address gateway) {
if (log.isDebugEnabled()) {
String gw = null;
try {
gw = gateway.toString();
} catch (Exception e) {
// fail silently
}
log.debug("Creating network {} with ID {} and gateway {}",
new Object[] {network, guid, gw});
}
if (!nameToGuid.isEmpty()) {
// We have to iterate all the networks to handle name/gateway changes
for (Entry<String, String> entry : nameToGuid.entrySet()) {
if (entry.getValue().equals(guid)) {
nameToGuid.remove(entry.getKey());
break;
}
}
}
if(network != null)
nameToGuid.put(network, guid);
if (vNetsByGuid.containsKey(guid))
vNetsByGuid.get(guid).setName(network); //network already exists, just updating name
else
vNetsByGuid.put(guid, new VirtualNetwork(network, guid)); //new network
// If they don't specify a new gateway the old one will be preserved
if ((gateway != null) && (gateway.getInt() != 0)) {
addGateway(guid, gateway);
if (vNetsByGuid.get(guid) != null)
vNetsByGuid.get(guid).setGateway(gateway.toString());
}
}