当前位置: 首页>>代码示例>>Java>>正文


Java OFFactories.getGenericReader方法代码示例

本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFFactories.getGenericReader方法的典型用法代码示例。如果您正苦于以下问题:Java OFFactories.getGenericReader方法的具体用法?Java OFFactories.getGenericReader怎么用?Java OFFactories.getGenericReader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.projectfloodlight.openflow.protocol.OFFactories的用法示例。


在下文中一共展示了OFFactories.getGenericReader方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: decode

import org.projectfloodlight.openflow.protocol.OFFactories; //导入方法依赖的package包/类
@Override
protected Object decode(ChannelHandlerContext ctx, Channel channel,
        ChannelBuffer buffer) throws Exception {
    if (!channel.isConnected()) {
        // In testing, I see decode being called AFTER decode last.
        // This check avoids that from reading corrupted frames
        return null;
    }

    // Note that a single call to decode results in reading a single
    // OFMessage from the channel buffer, which is passed on to, and processed
    // by, the controller (in OFChannelHandler).
    // This is different from earlier behavior (with the original openflowj),
    // where we parsed all the messages in the buffer, before passing on
    // a list of the parsed messages to the controller.
    // The performance *may or may not* not be as good as before.
    OFMessageReader<OFMessage> reader = OFFactories.getGenericReader();
    OFMessage message = reader.readFrom(buffer);

    return message;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:22,代码来源:OFMessageDecoder.java

示例2: setReader

import org.projectfloodlight.openflow.protocol.OFFactories; //导入方法依赖的package包/类
private void setReader() {
	reader = OFFactories.getGenericReader();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:4,代码来源:OFMessageDecoder.java

示例3: OFMessageDecoder

import org.projectfloodlight.openflow.protocol.OFFactories; //导入方法依赖的package包/类
public OFMessageDecoder() {
    reader = OFFactories.getGenericReader();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:4,代码来源:OFMessageDecoder.java


注:本文中的org.projectfloodlight.openflow.protocol.OFFactories.getGenericReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。