本文整理汇总了Java中org.openflow.protocol.OFEchoReply.setPayload方法的典型用法代码示例。如果您正苦于以下问题:Java OFEchoReply.setPayload方法的具体用法?Java OFEchoReply.setPayload怎么用?Java OFEchoReply.setPayload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openflow.protocol.OFEchoReply
的用法示例。
在下文中一共展示了OFEchoReply.setPayload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processOFEchoRequest
import org.openflow.protocol.OFEchoReply; //导入方法依赖的package包/类
void processOFEchoRequest(OFChannelHandler h, OFEchoRequest m)
throws IOException {
OFEchoReply reply = (OFEchoReply)
BasicFactory.getInstance().getMessage(OFType.ECHO_REPLY);
reply.setXid(m.getXid());
reply.setPayload(m.getPayload());
reply.setLengthU(m.getLengthU());
h.channel.write(Collections.singletonList(reply));
}
示例2: processOFEchoRequest
import org.openflow.protocol.OFEchoReply; //导入方法依赖的package包/类
/**
* Processes OpenFlow echo request message.
*
* @param h the switch channel handler
* @param m the echo request message
* @throws IOException TODO
*/
void processOFEchoRequest(final SwitchChannelHandler h,
final OFEchoRequest m) throws IOException {
final OFEchoReply reply = (OFEchoReply) BasicFactory.getInstance()
.getMessage(OFType.ECHO_REPLY);
reply.setXid(m.getXid());
reply.setPayload(m.getPayload());
reply.setLengthU(m.getLengthU());
h.channel.write(Collections.singletonList(reply));
}
示例3: processOFEchoRequest
import org.openflow.protocol.OFEchoReply; //导入方法依赖的package包/类
void processOFEchoRequest(final ControllerChannelHandler h,
final OFEchoRequest m) throws IOException {
final OFEchoReply reply = (OFEchoReply) BasicFactory.getInstance()
.getMessage(OFType.ECHO_REPLY);
reply.setXid(m.getXid());
reply.setPayload(m.getPayload());
reply.setLengthU(m.getLengthU());
h.channel.write(Collections.singletonList(reply));
}