Class AbstractNumericOperandParser<N>
java.lang.Object
org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser<NumericOperand>
org.opendaylight.protocol.bgp.flowspec.handlers.AbstractNumericOperandParser<N>
- Type Parameters:
- N- numeric operand type
- Direct Known Subclasses:
- NumericOneByteOperandParser,- NumericTwoByteOperandParser
Common parent class for numeric operands.
- 
Field SummaryFieldsFields inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParserAND_BIT, AND_BIT_VALUE, END_OF_LIST, END_OF_LIST_VALUE, LENGTH_SHIFT, OPERAND_LENGTH
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal NumericOperandCreates operand from a set of operand values.final NumericOperandparse(byte operand) Parses operand from byte value.protected abstract <T extends N>
 voidSerializes specific numeric operand type depending on the length field value.final voidserialize(NumericOperand operand, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Serializes operand to bytes.toString(NumericOperand operand, boolean isFirst) Creates a string representation of the operand.Methods inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParserparseLength
- 
Field Details- 
EQUALS_VALUE- See Also:
 
- 
GREATER_THAN_VALUE- See Also:
 
- 
LESS_THAN_VALUE- See Also:
 
 
- 
- 
Constructor Details- 
AbstractNumericOperandParserpublic AbstractNumericOperandParser()
 
- 
- 
Method Details- 
createDescription copied from class:AbstractOperandParserCreates operand from a set of operand values.- Specified by:
- createin class- AbstractOperandParser<NumericOperand>
- Parameters:
- operandValues- set of operand values
- Returns:
- specific type of operand
 
- 
serializepublic final void serialize(NumericOperand operand, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Description copied from class:AbstractOperandParserSerializes operand to bytes.- Specified by:
- serializein class- AbstractOperandParser<NumericOperand>
- Parameters:
- operand- operand to be serialized
- length- value of the 'length' field
- endOfList- if this operand is at the end of the list
- buffer- where the operand will be serialized to
 
- 
serializeSerializes specific numeric operand type depending on the length field value.- Parameters:
- list- of operands to be serialized
- nlriByteBuf- where the operands will be serialized
 
- 
parseDescription copied from class:AbstractOperandParserParses operand from byte value.- Specified by:
- parsein class- AbstractOperandParser<NumericOperand>
- Parameters:
- operand- byte representation of an operand
- Returns:
- operand object
 
- 
toStringDescription copied from class:AbstractOperandParserCreates a string representation of the operand. E.g. : 'and does not match'- Specified by:
- toStringin class- AbstractOperandParser<NumericOperand>
- Parameters:
- operand- operand
- isFirst- true if this operand is the first in list of operands
- Returns:
- String representation of the operand
 
- 
toString
 
-