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
Modifier and TypeFieldDescriptionstatic final BitmaskOperandParser
static final String
static final String
Fields 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.void
serialize
(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:AbstractOperandParser
Creates operand from a set of operand values.- Specified by:
create
in 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:AbstractOperandParser
Serializes operand to bytes.- Specified by:
serialize
in 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:AbstractOperandParser
Parses operand from byte value.- Specified by:
parse
in classAbstractOperandParser<BitmaskOperand>
- Parameters:
op
- byte representation of an operand- Returns:
- operand object
-
toString
Description copied from class:AbstractOperandParser
Creates a string representation of the operand. E.g. : 'and does not match'- Specified by:
toString
in classAbstractOperandParser<BitmaskOperand>
- Parameters:
op
- operandisFirst
- true if this operand is the first in list of operands- Returns:
- String representation of the operand
-