本文整理汇总了Java中org.onosproject.pcepio.protocol.PcepFecObjectIPv6类的典型用法代码示例。如果您正苦于以下问题:Java PcepFecObjectIPv6类的具体用法?Java PcepFecObjectIPv6怎么用?Java PcepFecObjectIPv6使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PcepFecObjectIPv6类属于org.onosproject.pcepio.protocol包,在下文中一共展示了PcepFecObjectIPv6类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import org.onosproject.pcepio.protocol.PcepFecObjectIPv6; //导入依赖的package包/类
/**
* reads the channel buffer and returns object of PcepFecObjectIPv6.
*
* @param cb of channel buffer.
* @return object of PcepFecObjectIPv6
* @throws PcepParseException when fails to read from channel buffer
*/
public static PcepFecObjectIPv6 read(ChannelBuffer cb) throws PcepParseException {
PcepObjectHeader fecObjHeader;
byte[] nodeID = new byte[IPV6_ADDRESS_LENGTH];
fecObjHeader = PcepObjectHeader.read(cb);
cb.readBytes(nodeID, 0, IPV6_ADDRESS_LENGTH);
return new PcepFecObjectIPv6Ver1(fecObjHeader, nodeID);
}
示例2: build
import org.onosproject.pcepio.protocol.PcepFecObjectIPv6; //导入依赖的package包/类
@Override
public PcepFecObjectIPv6 build() throws PcepParseException {
PcepObjectHeader fecObjHeader = this.bIsHeaderSet ? this.fecObjHeader : DEFAULT_FEC_OBJECT_HEADER;
if (!this.bIsNodeIdset) {
throw new PcepParseException(" NodeID not set while building PcepFecObjectIPv6 object.");
}
if (bIsPFlagSet) {
fecObjHeader.setPFlag(bPFlag);
}
if (bIsIFlagSet) {
fecObjHeader.setIFlag(bIFlag);
}
return new PcepFecObjectIPv6Ver1(fecObjHeader, this.nodeID);
}