public enum GroupType extends Enum<GroupType> implements OfpCodeBasedEnum
| Enum Constant and Description |
|---|
ALL
All (multicast/broadcast) group; Since 1.1.
|
FF
Fast failover group; Since 1.1.
|
INDIRECT
Indirect group; Since 1.1.
|
SELECT
Select group; Since 1.1.
|
| Modifier and Type | Method and Description |
|---|---|
static GroupType |
decode(int code,
ProtocolVersion pv)
Decodes the group type code and returns the corresponding
constant.
|
static Set<GroupType> |
decodeFlags(int bitmap,
ProtocolVersion pv)
Decodes the group type flags, based on the code associated with the
flags, and returns the set of corresponding constants.
|
static int |
encodeFlags(Set<GroupType> flags,
ProtocolVersion pv)
Encodes a set of group type flags as a bitmap.
|
int |
getCode(ProtocolVersion pv)
Returns the code for the constant, under the given protocol
version.
|
static GroupType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GroupType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GroupType ALL
public static final GroupType SELECT
public static final GroupType INDIRECT
public static final GroupType FF
public static GroupType[] values()
for (GroupType c : GroupType.values()) System.out.println(c);
public static GroupType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic int getCode(ProtocolVersion pv)
OfpCodeBasedEnumgetCode in interface OfpCodeBasedEnumpv - the protocol versionpublic static GroupType decode(int code, ProtocolVersion pv) throws DecodeException
code - the encoded typepv - the protocol versionDecodeException - if the code is not recognizedVersionMismatchException - if the group type is not
supported in the given versionpublic static Set<GroupType> decodeFlags(int bitmap, ProtocolVersion pv)
bitmap - the bitmap to decodepv - the protocol versionNullPointerException - if protocol version is nullVersionMismatchException - if a bit position is not supported
in the given versionpublic static int encodeFlags(Set<GroupType> flags, ProtocolVersion pv)
flags
parameter may be empty, in which case a bitmap of 0 (zero) is returned.flags - the flags to encodepv - the protocol versionNullPointerException - if either parameter is nullIllegalArgumentException - if code associated with enumeration
constant is outside the valid range (0 - 31)VersionMismatchException - if a flag is present that is not
supported in the given protocol versionCopyright © 2014. All Rights Reserved.