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


Java PcepIroObject类代码示例

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


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

示例1: PcepAttributeVer1

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
/**
 * Constructor to initialize all parameters for PCEP attribute.
 *
 * @param lspaObject         PCEP lspa Object.
 * @param bandwidthObject    PCEP bandwidth object.
 * @param llMetricList       list of PCEP metric objects.
 * @param iroObject          PCEP iro object.
 */
public PcepAttributeVer1(PcepLspaObject lspaObject, PcepBandwidthObject bandwidthObject,
        LinkedList<PcepMetricObject> llMetricList, PcepIroObject iroObject) {

    this.lspaObject = lspaObject;
    this.bandwidthObject = bandwidthObject;
    this.llMetricList = llMetricList;
    this.iroObject = iroObject;
    if (lspaObject == null) {
        this.isLspaObjectSet = false;
    } else {
        this.isLspaObjectSet = true;
    }
    if (bandwidthObject == null) {
        this.isBandwidthObjectSet = false;
    } else {
        this.isBandwidthObjectSet = true;
    }
    if (llMetricList == null) {
        this.isMetricListSet = false;
    } else {
        this.isMetricListSet = true;
    }
    if (iroObject == null) {
        this.isIroObjectSet = false;
    } else {
        this.isIroObjectSet = true;
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:37,代码来源:PcepAttributeVer1.java

示例2: build

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
@Override
public PcepAttribute build() {

    //PCEP LSPA Object
    PcepLspaObject lspaObject = null;

    //PCEP BANDWIDTH Object
    PcepBandwidthObject bandwidthObject = null;

    //PCEP Metric list
    LinkedList<PcepMetricObject> llMetricList = null;

    //PCEP IRO object
    PcepIroObject iroObject = null;

    if (this.isLspaObjectSet) {
        lspaObject = this.lspaObject;
    }
    if (this.isBandwidthObjectSet) {
        bandwidthObject = this.bandwidthObject;
    }
    if (this.isMetricListSet) {
        llMetricList = this.llMetricList;
    }
    if (this.isIroObjectSet) {
        iroObject = this.iroObject;
    }
    return new PcepAttributeVer1(lspaObject, bandwidthObject, llMetricList, iroObject);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:30,代码来源:PcepAttributeVer1.java

示例3: read

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
/**
 * Reads from channel buffer and return object of PcepIroObject.
 *
 * @param cb of type channel buffer
 * @return object of PcepIroObject
 * @throws PcepParseException while parsing from channel buffer
 */
public static PcepIroObject read(ChannelBuffer cb) throws PcepParseException {

    PcepObjectHeader iroObjHeader;
    LinkedList<PcepValueType> llSubObjects;

    iroObjHeader = PcepObjectHeader.read(cb);

    //take only IroObject buffer.
    ChannelBuffer tempCb = cb.readBytes(iroObjHeader.getObjLen() - OBJECT_HEADER_LENGTH);
    llSubObjects = parseSubObjects(tempCb);
    return new PcepIroObjectVer1(iroObjHeader, llSubObjects);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:20,代码来源:PcepIroObjectVer1.java

示例4: build

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
@Override
public PcepIroObject build() {

    PcepObjectHeader iroObjHeader = this.bIsHeaderSet ? this.iroObjHeader : DEFAULT_IRO_OBJECT_HEADER;

    if (bIsPFlagSet) {
        iroObjHeader.setPFlag(bPFlag);
    }

    if (bIsIFlagSet) {
        iroObjHeader.setIFlag(bIFlag);
    }

    return new PcepIroObjectVer1(iroObjHeader, this.llSubObjects);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:PcepIroObjectVer1.java

示例5: read

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
/**
 * Reads lspa , bandwidth , Metriclist and Iro objects and sets the objects.
 *
 * @param cb of type channel buffer
 * @return instance of Pcep Attribute
 * @throws PcepParseException while parsing Pcep Attributes from channel buffer
 */

public static PcepAttribute read(ChannelBuffer cb) throws PcepParseException {
    if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
        return null;
    }
    //check whether any pcep attribute is present
    cb.markReaderIndex();
    PcepObjectHeader tempObjHeader = PcepObjectHeader.read(cb);
    cb.resetReaderIndex();
    byte yObjClass = tempObjHeader.getObjClass();

    if (PcepLspaObjectVer1.LSPA_OBJ_CLASS != yObjClass && PcepBandwidthObjectVer1.BANDWIDTH_OBJ_CLASS != yObjClass
            && PcepMetricObjectVer1.METRIC_OBJ_CLASS != yObjClass && PcepIroObjectVer1.IRO_OBJ_CLASS != yObjClass) {
        //No PCEP attribute is present
        return null;
    }

    PcepAttributeVer1 pcepAttribute = new PcepAttributeVer1();

    //If LSPA present then store it.LSPA is optional
    if (yObjClass == PcepLspaObjectVer1.LSPA_OBJ_CLASS) {
        pcepAttribute.setLspaObject(PcepLspaObjectVer1.read(cb));
        yObjClass = checkNextObject(cb);
    }

    //If BANDWIDTH present then store it.BANDWIDTH is optional
    if (yObjClass == PcepBandwidthObjectVer1.BANDWIDTH_OBJ_CLASS) {
        pcepAttribute.setBandwidthObject(PcepBandwidthObjectVer1.read(cb));
        yObjClass = checkNextObject(cb);
    }

    //If Metric list present then store it.MetricList is optional
    if (yObjClass == PcepMetricObjectVer1.METRIC_OBJ_CLASS) {
        pcepAttribute.parseMetricList(cb);
        yObjClass = checkNextObject(cb);
    }

    //If IRO present then store it.IRO is optional
    if (yObjClass == PcepIroObjectVer1.IRO_OBJ_CLASS) {
        pcepAttribute.setIroObject(PcepIroObjectVer1.read(cb));
    }

    PcepLspaObject lspaObject = pcepAttribute.getLspaObject();
    PcepBandwidthObject bandwidthObject = pcepAttribute.getBandwidthObject();
    LinkedList<PcepMetricObject> metriclist = pcepAttribute.llMetricList;
    PcepIroObject iroObject = pcepAttribute.getIroObject();

    return new PcepAttributeVer1(lspaObject, bandwidthObject, metriclist, iroObject);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:57,代码来源:PcepAttributeVer1.java

示例6: getIroObject

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
@Override
public PcepIroObject getIroObject() {
    return iroObject;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:5,代码来源:PcepAttributeVer1.java

示例7: setIroObject

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
@Override
public void setIroObject(PcepIroObject iroObject) {
    this.isIroObjectSet = true;
    this.iroObject = iroObject;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:6,代码来源:PcepAttributeVer1.java

示例8: buildIroObject

import org.onosproject.pcepio.protocol.PcepIroObject; //导入依赖的package包/类
@Override
public PcepIroObject.Builder buildIroObject() {
    return new PcepIroObjectVer1.Builder();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:5,代码来源:PcepFactoryVer1.java


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