Class BitmaskOperandParser
java.lang.Object
org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser<BitmaskOperand>
org.opendaylight.protocol.bgp.flowspec.handlers.BitmaskOperandParser
Parser class for BitmaskOperand.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BitmaskOperandParserstatic final Stringstatic final StringFields inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser
AND_BIT, AND_BIT_VALUE, END_OF_LIST, END_OF_LIST_VALUE, LENGTH_SHIFT, OPERAND_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionCreates operand from a set of operand values.parse(byte op) Parses operand from byte value.voidserialize(BitmaskOperand op, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Serializes operand to bytes.toString(BitmaskOperand op, boolean isFirst) Creates a string representation of the operand.Methods inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser
parseLength
-
Field Details
-
INSTANCE
-
MATCH_VALUE
- See Also:
-
NOT_VALUE
- See Also:
-
-
Method Details
-
create
Description copied from class:AbstractOperandParserCreates operand from a set of operand values.- Specified by:
createin classAbstractOperandParser<BitmaskOperand>- Parameters:
opValues- set of operand values- Returns:
- specific type of operand
-
serialize
public void serialize(BitmaskOperand op, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Description copied from class:AbstractOperandParserSerializes operand to bytes.- Specified by:
serializein classAbstractOperandParser<BitmaskOperand>- Parameters:
op- operand to be serializedlength- value of the 'length' fieldendOfList- if this operand is at the end of the listbuffer- where the operand will be serialized to
-
parse
Description copied from class:AbstractOperandParserParses operand from byte value.- Specified by:
parsein classAbstractOperandParser<BitmaskOperand>- Parameters:
op- byte representation of an operand- Returns:
- operand object
-
toString
Description copied from class:AbstractOperandParserCreates a string representation of the operand. E.g. : 'and does not match'- Specified by:
toStringin classAbstractOperandParser<BitmaskOperand>- Parameters:
op- operandisFirst- true if this operand is the first in list of operands- Returns:
- String representation of the operand
-