• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IOFConnectionBackend类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.floodlightcontroller.core.IOFConnectionBackend的典型用法代码示例。如果您正苦于以下问题:Java IOFConnectionBackend类的具体用法?Java IOFConnectionBackend怎么用?Java IOFConnectionBackend使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IOFConnectionBackend类属于net.floodlightcontroller.core包,在下文中一共展示了IOFConnectionBackend类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: connectionClosed

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
/** IOFConnectionListener */
@Override
public void connectionClosed(IOFConnectionBackend connection) {
	// Disconnect handler's remaining connections
	cleanup();

	// Only remove the switch handler when the main connection is
	// closed
	if (connection == this.mainConnection) {
		switchManager.handshakeDisconnected(connection.getDatapathId());
		if(sw != null) {
			log.debug("[{}] - main connection {} closed - disconnecting switch",
					connection);

			setSwitchStatus(SwitchStatus.DISCONNECTED);
			switchManager.switchDisconnected(sw);
		}
	}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:OFSwitchHandshakeHandler.java


示例2: getOFSwitchInstance

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
@Override
public IOFSwitchBackend
        getOFSwitchInstance(IOFConnectionBackend connection,
                            SwitchDescription description,
                            OFFactory factory, DatapathId datapathId) {
    return null;
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:8,代码来源:MockSwitchManager.java


示例3: OFSwitch

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
public OFSwitch(IOFConnectionBackend connection, @Nonnull OFFactory factory, @Nonnull IOFSwitchManager switchManager, 
		@Nonnull DatapathId datapathId) {
	if(connection == null)
		throw new NullPointerException("connection must not be null");
	if(!connection.getAuxId().equals(OFAuxId.MAIN))
		throw new IllegalArgumentException("connection must be the main connection");
	if(factory == null)
		throw new NullPointerException("factory must not be null");
	if(switchManager == null)
		throw new NullPointerException("switchManager must not be null");

	this.connected = true;
	this.factory = factory;
	this.switchManager = switchManager;
	this.datapathId = datapathId;
	this.attributes = new ConcurrentHashMap<Object, Object>();
	this.role = null;
	this.description = new SwitchDescription();
	this.portManager = new PortManager();
	this.status = SwitchStatus.HANDSHAKE;

	// Connections
	this.connections = new ConcurrentHashMap<OFAuxId, IOFConnectionBackend>();
	this.connections.put(connection.getAuxId(), connection);

	// Switch's controller connection
	this.controllerConnections = ImmutableMap.of();

	// Defaults properties for an ideal switch
	this.setAttribute(PROP_FASTWILDCARDS, EnumSet.allOf(OFFlowWildcards.class));
	this.setAttribute(PROP_SUPPORTS_OFPP_FLOOD, Boolean.TRUE);
	this.setAttribute(PROP_SUPPORTS_OFPP_TABLE, Boolean.TRUE);

	this.tableFeaturesByTableId = new HashMap<TableId, TableFeatures>();
	this.tables = new ArrayList<TableId>();
	
	this.securityKernel = switchManager.getSecurityKernelService();

}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:40,代码来源:OFSwitch.java


示例4: disconnect

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
@Override
public void disconnect() {
	// Iterate through connections and perform cleanup
	for (Entry<OFAuxId, IOFConnectionBackend> entry : this.connections.entrySet()) {
		entry.getValue().disconnect();
		this.connections.remove(entry.getKey());
	}
	log.debug("~~~~~~~SWITCH DISCONNECTED~~~~~~");
	// Remove all counters from the store
	connected = false;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:12,代码来源:OFSwitch.java


示例5: OFSwitchHandshakeHandler

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
/**
 * Create a new unconnected OFChannelHandler.
 * @param controller
 * @param broker
 * @throws SwitchHandshakeHandlerException
 */
OFSwitchHandshakeHandler(@Nonnull IOFConnectionBackend connection,
		@Nonnull OFFeaturesReply featuresReply,
		@Nonnull IOFSwitchManager switchManager,
		@Nonnull RoleManager roleManager,
		@Nonnull Timer timer) {
	Preconditions.checkNotNull(connection, "connection");
	Preconditions.checkNotNull(featuresReply, "featuresReply");
	Preconditions.checkNotNull(switchManager, "switchManager");
	Preconditions.checkNotNull(roleManager, "roleManager");
	Preconditions.checkNotNull(timer, "timer");
	Preconditions.checkArgument(connection.getAuxId().equals(OFAuxId.MAIN),
			"connection must be MAIN connection but is %s", connection);

	this.switchManager = switchManager;
	this.roleManager = roleManager;
	this.mainConnection = connection;
	this.auxConnections = new ConcurrentHashMap<OFAuxId, IOFConnectionBackend>();
	this.featuresReply = featuresReply;
	this.timer = timer;
	this.switchManagerCounters = switchManager.getCounters();
	this.factory = OFFactories.getFactory(featuresReply.getVersion());
	this.roleChanger = new RoleChanger(DEFAULT_ROLE_TIMEOUT_NS);
	setState(new InitState());
	this.pendingPortStatusMsg = new ArrayList<OFPortStatus>();

	connection.setListener(this);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:34,代码来源:OFSwitchHandshakeHandler.java


示例6: auxConnectionOpened

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
/**
 * Called by the switch manager when new aux connections have connected.
 * This alerts the state machine of an aux connection.
 *
 * @param connection
 *            the aux connection
 */
public synchronized void auxConnectionOpened(IOFConnectionBackend connection) {
	if(log.isDebugEnabled())
		log.debug("[{}] - Switch Handshake - new aux connection {}", this.getDpid(), connection.getAuxId());

	// Handle new Auxiliary connections if the main connection has completed (i.e. in ACTIVE or STANDBY state)
	if (this.getState().equals("ACTIVE") || this.getState().equals("STANDBY")) {
		auxConnections.put(connection.getAuxId(), connection);
		connection.setListener(OFSwitchHandshakeHandler.this);
		log.info("Auxiliary connection {} added for {}.", connection.getAuxId().getValue(), connection.getDatapathId().toString());
	} else {
		log.info("Auxiliary connection {} initiated for {} before main connection handshake complete. Ignorning aux connection attempt.", connection.getAuxId().getValue(), connection.getDatapathId().toString());
	}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:OFSwitchHandshakeHandler.java


示例7: hasConnection

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
/**
 * Determines if this handshake handler is responsible for the supplied
 * connection.
 *
 * @param connection
 *            an OF connection
 * @return true if the handler has the connection
 */
public boolean hasConnection(IOFConnectionBackend connection) {
	if (this.mainConnection.equals(connection)
			|| this.auxConnections.get(connection.getAuxId()) == connection) {
		return true;
	} else {
		return false;
	}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:OFSwitchHandshakeHandler.java


示例8: cleanup

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
void cleanup() {
	for (IOFConnectionBackend conn : this.auxConnections.values()) {
		conn.disconnect();
	}

	this.mainConnection.disconnect();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:8,代码来源:OFSwitchHandshakeHandler.java


示例9: getOFSwitchInstance

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
@Override
public IOFSwitchBackend getOFSwitchInstance(IOFConnectionBackend connection,
		SwitchDescription description,
		OFFactory factory, DatapathId datapathId) {

	return this.driverRegistry.getOFSwitchInstance(connection, description, factory, datapathId);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:8,代码来源:OFSwitchManager.java


示例10: OFSwitch

import net.floodlightcontroller.core.IOFConnectionBackend; //导入依赖的package包/类
public OFSwitch(IOFConnectionBackend connection, @Nonnull OFFactory factory, @Nonnull IOFSwitchManager switchManager,
		@Nonnull DatapathId datapathId) {
	if(connection == null)
		throw new NullPointerException("connection must not be null");
	if(!connection.getAuxId().equals(OFAuxId.MAIN))
		throw new IllegalArgumentException("connection must be the main connection");
	if(factory == null)
		throw new NullPointerException("factory must not be null");
	if(switchManager == null)
		throw new NullPointerException("switchManager must not be null");

	this.connected = true;
	this.factory = factory;
	this.switchManager = switchManager;
	this.datapathId = datapathId;
	this.attributes = new ConcurrentHashMap<Object, Object>();
	this.role = null;
	this.description = new SwitchDescription();
	this.portManager = new PortManager();
	this.status = SwitchStatus.HANDSHAKE;

	// Connections
	this.connections = new ConcurrentHashMap<OFAuxId, IOFConnectionBackend>();
	this.connections.put(connection.getAuxId(), connection);

	// Switch's controller connection
	this.controllerConnections = ImmutableMap.of();

	// Defaults properties for an ideal switch
	this.setAttribute(PROP_FASTWILDCARDS, EnumSet.allOf(OFFlowWildcards.class));
	this.setAttribute(PROP_SUPPORTS_OFPP_FLOOD, Boolean.TRUE);
	this.setAttribute(PROP_SUPPORTS_OFPP_TABLE, Boolean.TRUE);

	this.tableFeaturesByTableId = new HashMap<TableId, TableFeatures>();
	this.tables = new ArrayList<TableId>();
}
 
开发者ID:sammyyx,项目名称:ACAMPController,代码行数:37,代码来源:OFSwitch.java



注:本文中的net.floodlightcontroller.core.IOFConnectionBackend类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StringUtils类代码示例发布时间:2022-05-22
下一篇:
Java ItemVisitor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap