public class WideCommunityAttrHeader extends Object implements BgpValueType
| Modifier and Type | Field and Description |
|---|---|
static short |
HEADER_LENGTH |
static short |
TYPE |
| Constructor and Description |
|---|
WideCommunityAttrHeader(byte flag,
byte hopCount,
short length)
Wide community attribute header.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o)
Compares two objects.
|
boolean |
equals(Object obj) |
byte |
flag()
Returns wide community flag.
|
short |
getType()
Returns the Type of BGP Message.
|
int |
hashCode() |
byte |
hopCount()
Returns hop count for wide community attribute.
|
short |
length()
Returns length of wide community attribute.
|
static WideCommunityAttrHeader |
of(byte flag,
byte hopCount,
short length)
Returns object of this class with specified values.
|
static WideCommunityAttrHeader |
read(org.jboss.netty.buffer.ChannelBuffer c)
Reads the channel buffer and returns object of WideCommunityAttrHeader.
|
void |
setFlag(byte flag)
Sets wide community flag.
|
void |
setHopCount(byte hopCount)
Sets wide community hop count.
|
void |
setLength(short length)
Sets wide community length.
|
String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer c)
Writes the byte Stream of BGP Message to channel buffer.
|
public static final short TYPE
public static final short HEADER_LENGTH
public WideCommunityAttrHeader(byte flag,
byte hopCount,
short length)
flag - to apply to all wide community container typeshopCount - represents the forwarding radius, in units of AS hops, for the given Wide BGP Communitylength - field represents the total length of a given containerpublic static WideCommunityAttrHeader of(byte flag, byte hopCount, short length)
flag - flag to apply to all wide community container typeshopCount - represents the forwarding radius, in units of AS hops, for the given Wide BGP Communitylength - field represents the total length of a given containerpublic byte flag()
public void setFlag(byte flag)
flag - to apply to all wide community container typespublic byte hopCount()
public void setHopCount(byte hopCount)
hopCount - represents the forwarding radius, in units of AS hops, for the given Wide BGP Communitypublic short length()
public void setLength(short length)
length - total length of a given containerpublic int write(org.jboss.netty.buffer.ChannelBuffer c)
BgpValueTypewrite in interface BgpValueTypec - channel bufferpublic static WideCommunityAttrHeader read(org.jboss.netty.buffer.ChannelBuffer c) throws BgpParseException
c - ChannelBufferBgpParseException - if a parsing error occurspublic short getType()
BgpValueTypegetType in interface BgpValueTypepublic int compareTo(Object o)
BgpValueTypecompareTo in interface BgpValueTypeo - object