protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpLinkAttrTeDefaultMetric.java
/**
     * Reads the BGP link attributes of TE default metric.
     *
     * @param cb Channel buffer
     * @return object of type BgpLinkAttrTeDefaultMetric
     * @throws BgpParseException while parsing BgpLinkAttrTeDefaultMetric
     */
Reads the BGP link attributes of TE default metric.
@param cb Channel buffer
@return object of type BgpLinkAttrTeDefaultMetric
@throws BgpParseException while parsing BgpLinkAttrTeDefaultMetric
Reads the BGP link attributes of TE default metric . @param cb Channel buffer @return object of type BgpLinkAttrTeDefaultMetric @throws BgpParseException while parsing BgpLinkAttrTeDefaultMetric
public static BgpLinkAttrTeDefaultMetric read(ChannelBuffer cb)
            throws BgpParseException {
        int linkTeMetric;
        short lsAttrLength = cb.readShort();
        if ((lsAttrLength != TE_DATA_LEN)
                || (cb.readableBytes() < lsAttrLength)) {
            Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR,
                                   BgpErrorType.ATTRIBUTE_LENGTH_ERROR,
                                   lsAttrLength);
        }
        linkTeMetric = cb.readInt();
        return new BgpLinkAttrTeDefaultMetric(linkTeMetric);
    }
public static BgpLinkAttrTeDefaultMetric read ( ChannelBuffer cb ) throws BgpParseException { int linkTeMetric ; short lsAttrLength = cb . readShort ( ) ; if ( ( lsAttrLength != TE_DATA_LEN ) || ( cb . readableBytes ( ) < lsAttrLength ) ) { Validation . validateLen ( BgpErrorType . UPDATE_MESSAGE_ERROR , BgpErrorType . ATTRIBUTE_LENGTH_ERROR , lsAttrLength ) ; } linkTeMetric = cb . readInt ( ) ; return new BgpLinkAttrTeDefaultMetric ( linkTeMetric ) ; }
Reads the BGP link attributes of TE default metric.
Reads the BGP link attributes of TE default metric .