public class LocalPref extends java.lang.Object implements BgpValueType
| Modifier and Type | Field and Description |
|---|---|
static byte |
FLAGS |
static byte |
LOCAL_PREF_MAX_LEN |
static byte |
LOCAL_PREF_TYPE |
| Constructor and Description |
|---|
LocalPref(int localPref)
Constructor to initialize LocalPref.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Compares two objects.
|
boolean |
equals(java.lang.Object obj) |
short |
getType()
Returns the Type of BGP Message.
|
int |
hashCode() |
int |
localPref()
Returns local preference value.
|
static LocalPref |
read(org.jboss.netty.buffer.ChannelBuffer cb)
Reads the channel buffer and returns object of LocalPref.
|
java.lang.String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Writes the byte Stream of BGP Message to channel buffer.
|
public static final byte LOCAL_PREF_TYPE
public static final byte LOCAL_PREF_MAX_LEN
public static final byte FLAGS
public LocalPref(int localPref)
localPref - local preferencepublic int localPref()
public static LocalPref read(org.jboss.netty.buffer.ChannelBuffer cb) throws BgpParseException
cb - channelBufferBgpParseException - while parsing localPref attributepublic short getType()
BgpValueTypegetType in interface BgpValueTypepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int write(org.jboss.netty.buffer.ChannelBuffer cb)
BgpValueTypewrite in interface BgpValueTypecb - channel bufferpublic int compareTo(java.lang.Object o)
BgpValueTypecompareTo in interface BgpValueTypeo - object