Class BitmaskOperandParser
- java.lang.Object
-
- org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser<BitmaskOperand>
-
- org.opendaylight.protocol.bgp.flowspec.handlers.BitmaskOperandParser
-
public final class BitmaskOperandParser extends AbstractOperandParser<BitmaskOperand>
Parser class for BitmaskOperand.
-
-
Field Summary
Fields Modifier and Type Field Description static BitmaskOperandParser
INSTANCE
static String
MATCH_VALUE
static String
NOT_VALUE
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitmaskOperand
create(Set<String> opValues)
Creates operand from a set of operand values.BitmaskOperand
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.String
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 Detail
-
INSTANCE
public static final BitmaskOperandParser INSTANCE
-
MATCH_VALUE
public static final String MATCH_VALUE
- See Also:
- Constant Field Values
-
NOT_VALUE
public static final String NOT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public BitmaskOperand create(Set<String> opValues)
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
public BitmaskOperand parse(byte op)
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
public String toString(BitmaskOperand op, boolean isFirst)
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
-
-