/**
* everytime the timer fires run this!
* Looks through every proxy and determines if the proxy needs to
* attempt to connect to the controller.
*/
public synchronized void run(){
log.debug("Looking for controllers not currently connected");
Iterator <Long> it = proxies.keySet().iterator();
while(it.hasNext()){
List <Proxy> ps = proxies.get(it.next());
Iterator <Proxy> proxyIt = ps.iterator();
while(proxyIt.hasNext()){
Proxy p = proxyIt.next();
log.debug("Proxy for " + p.getSwitch().getStringId() + " " + p.getSlicer().getControllerAddress().toString() + " is connected: " + p.connected());
if(!p.connected() && p.getAdminStatus()){
log.debug("Creating new Channel to " + p.getSlicer().getControllerAddress().toString() + " for switch: " + p.getSwitch().getStringId());
SocketChannel controller_channel = channelCreator.newChannel(getPipeline());
p.connect(controller_channel);
}
}
}
}
ControllerConnector.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:FlowSpaceFirewall
作者:
评论列表
文章目录