public class PcepLabelRangeObjectVer1 extends Object implements PcepLabelRangeObject
| Modifier and Type | Class and Description |
|---|---|
static class |
PcepLabelRangeObjectVer1.Builder
Builder class for PCEP label range object.
|
| Modifier and Type | Field and Description |
|---|---|
static byte |
LABEL_RANGE_OBJ_CLASS |
static short |
LABEL_RANGE_OBJ_MINIMUM_LENGTH |
static byte |
LABEL_RANGE_OBJ_TYPE |
static byte |
LABEL_RANGE_OBJECT_VERSION |
protected static org.slf4j.Logger |
log |
static int |
MINIMUM_COMMON_HEADER_LENGTH |
| Constructor and Description |
|---|
PcepLabelRangeObjectVer1(PcepObjectHeader labelRangeObjHeader,
byte labelType,
int rangeSize,
int labelBase,
LinkedList<PcepValueType> llOptionalTlv)
Constructor to initialize parameters for PCEP label range object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLabelBase()
Returns LabelBase field in LabelRange object.
|
PcepObjectHeader |
getLabelRangeObjHeader()
Returns LabelRange object header.
|
byte |
getLabelType()
Returns LabelType field in LabelRange object.
|
int |
getRangeSize()
Returns RangeSize field in LabelRange object.
|
protected boolean |
packOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
Pack optional tlvs.
|
static LinkedList<PcepValueType> |
parseOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
Returns list of optional tlvs.
|
static PcepLabelRangeObject |
read(org.jboss.netty.buffer.ChannelBuffer cb)
Reads from the channel buffer and returns object of PcepLabelRangeObject.
|
void |
setLabelBase(int labelBase)
Sets LabelBase in LabelRange Object.
|
void |
setLabelRangeObjHeader(PcepObjectHeader obj)
Sets LabelRange Object header.
|
void |
setLabelType(byte labelType)
Sets LabelType in LabelRange Object.
|
void |
setRangeSize(int rangeSize)
Sets RangeSize in LabelRange Object.
|
String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Writes the LabelRange Object into channel buffer.
|
protected static final org.slf4j.Logger log
public static final byte LABEL_RANGE_OBJ_TYPE
public static final byte LABEL_RANGE_OBJ_CLASS
public static final byte LABEL_RANGE_OBJECT_VERSION
public static final short LABEL_RANGE_OBJ_MINIMUM_LENGTH
public static final int MINIMUM_COMMON_HEADER_LENGTH
public PcepLabelRangeObjectVer1(PcepObjectHeader labelRangeObjHeader, byte labelType, int rangeSize, int labelBase, LinkedList<PcepValueType> llOptionalTlv)
labelRangeObjHeader - label range object headerlabelType - label typerangeSize - range sizelabelBase - label basellOptionalTlv - list of optional tlvspublic void setLabelRangeObjHeader(PcepObjectHeader obj)
PcepLabelRangeObjectsetLabelRangeObjHeader in interface PcepLabelRangeObjectobj - LabelRange Object headerpublic void setLabelType(byte labelType)
PcepLabelRangeObjectsetLabelType in interface PcepLabelRangeObjectlabelType - label type valuepublic void setRangeSize(int rangeSize)
PcepLabelRangeObjectsetRangeSize in interface PcepLabelRangeObjectrangeSize - range size valuepublic void setLabelBase(int labelBase)
PcepLabelRangeObjectsetLabelBase in interface PcepLabelRangeObjectlabelBase - label base valuepublic PcepObjectHeader getLabelRangeObjHeader()
PcepLabelRangeObjectgetLabelRangeObjHeader in interface PcepLabelRangeObjectpublic byte getLabelType()
PcepLabelRangeObjectgetLabelType in interface PcepLabelRangeObjectpublic int getRangeSize()
PcepLabelRangeObjectgetRangeSize in interface PcepLabelRangeObjectpublic int getLabelBase()
PcepLabelRangeObjectgetLabelBase in interface PcepLabelRangeObjectpublic static PcepLabelRangeObject read(org.jboss.netty.buffer.ChannelBuffer cb) throws PcepParseException
cb - of type channel bufferPcepParseException - when fails to read from channel bufferpublic int write(org.jboss.netty.buffer.ChannelBuffer cb)
throws PcepParseException
PcepLabelRangeObjectwrite in interface PcepLabelRangeObjectcb - channel bufferPcepParseException - while writing LABEL RANGE object into Channel Buffer.public static LinkedList<PcepValueType> parseOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb) throws PcepParseException
cb - of type channle bufferPcepParseException - whne fails to parse list of optional tlvsprotected boolean packOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
cb - of channel buffer