public class PcepLabelObjectVer1 extends Object implements PcepLabelObject
| Modifier and Type | Class and Description |
|---|---|
static class |
PcepLabelObjectVer1.Builder
Builder class for PCEP label object.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_OFLAG |
static byte |
LABEL_OBJ_CLASS |
static short |
LABEL_OBJ_MINIMUM_LENGTH |
static byte |
LABEL_OBJ_TYPE |
static byte |
LABEL_OBJECT_VERSION |
protected static org.slf4j.Logger |
log |
static int |
MINIMUM_COMMON_HEADER_LENGTH |
static byte |
OBJECT_HEADER_LENGTH |
static int |
OFLAG_RESET |
static int |
OFLAG_SET |
| Constructor and Description |
|---|
PcepLabelObjectVer1(PcepObjectHeader labelObjHeader,
boolean bOFlag,
int label,
LinkedList<PcepValueType> llOptionalTlv)
Constructor to initialize parameters for PCEP label object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLabel()
Returns Label from Label Object.
|
boolean |
getOFlag()
Returns O flag in Label Object.
|
LinkedList<PcepValueType> |
getOptionalTlv()
Returns list of Optional Tlvs.
|
protected int |
packOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
Returns the writer index.
|
protected static LinkedList<PcepValueType> |
parseOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
Returns list of optional tlvs.
|
static PcepLabelObject |
read(org.jboss.netty.buffer.ChannelBuffer cb)
Reads form channel buffer and returns objects of PcepLabelObject.
|
void |
setLabel(int value)
Sets Label field in Label Object with specified value.
|
void |
setOFlag(boolean value)
Sets O flag in Label Object with specified value.
|
void |
setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv)
Sets Optional Tlvs in Label Object.
|
String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Writes the Label Object into channel buffer.
|
protected static final org.slf4j.Logger log
public static final byte LABEL_OBJ_TYPE
public static final byte LABEL_OBJ_CLASS
public static final byte LABEL_OBJECT_VERSION
public static final byte OBJECT_HEADER_LENGTH
public static final boolean DEFAULT_OFLAG
public static final short LABEL_OBJ_MINIMUM_LENGTH
public static final int OFLAG_SET
public static final int OFLAG_RESET
public static final int MINIMUM_COMMON_HEADER_LENGTH
public PcepLabelObjectVer1(PcepObjectHeader labelObjHeader, boolean bOFlag, int label, LinkedList<PcepValueType> llOptionalTlv)
labelObjHeader - label object headerbOFlag - O flaglabel - labelllOptionalTlv - list of optional tlvspublic LinkedList<PcepValueType> getOptionalTlv()
PcepLabelObjectgetOptionalTlv in interface PcepLabelObjectpublic void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv)
PcepLabelObjectsetOptionalTlv in interface PcepLabelObjectllOptionalTlv - list of Optional Tlvspublic boolean getOFlag()
PcepLabelObjectgetOFlag in interface PcepLabelObjectpublic void setOFlag(boolean value)
PcepLabelObjectsetOFlag in interface PcepLabelObjectvalue - O flagpublic int getLabel()
PcepLabelObjectgetLabel in interface PcepLabelObjectpublic void setLabel(int value)
PcepLabelObjectsetLabel in interface PcepLabelObjectvalue - Labelpublic static PcepLabelObject 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
PcepLabelObjectwrite in interface PcepLabelObjectcb - channel bufferPcepParseException - while writing LABEL object into Channel Buffer.protected static LinkedList<PcepValueType> parseOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb) throws PcepParseException
cb - of type channel bufferPcepParseException - when fails to parse list of optional tlvsprotected int packOptionalTlv(org.jboss.netty.buffer.ChannelBuffer cb)
cb - of channel buffer.Copyright © 2015. All rights reserved.