public class HelloElementFactory extends AbstractFactory
HelloElement
instances.Modifier and Type | Method and Description |
---|---|
static HelloElement |
createVersionBitmapElement(Set<ProtocolVersion> suppVers)
Creates a VERSION BITMAP hello element for the given supported
versions.
|
static void |
encodeElement(HelloElement elem,
OfPacketWriter pkt)
Encodes a hello element, writing it into the supplied buffer.
|
static void |
encodeElementList(List<HelloElement> elems,
OfPacketWriter pkt)
Encodes a list of hello elements, writing it into the supplied buffer.
|
protected String |
tag()
Returns an identifying tag for the hello element factory.
|
mpe, mpe, mpe, mpe
protected String tag()
tag
in class AbstractFactory
public static HelloElement createVersionBitmapElement(Set<ProtocolVersion> suppVers)
ProtocolVersion
in the header of the
OfmHello
message must be set to the highest version listed
in the bitmap; so that version is embedded in this element structure
so that it can be retrieved easily when constructing the HELLO message.suppVers
- supported versionsNullPointerException
- if suppVers is nullIllegalArgumentException
- if suppVers is emptypublic static void encodeElement(HelloElement elem, OfPacketWriter pkt)
PacketBuffer
to be advanced by the length of the element.elem
- the hello elementpkt
- the buffer into which the element is to be writtenpublic static void encodeElementList(List<HelloElement> elems, OfPacketWriter pkt)
PacketBuffer
to be advanced by the length of the written
elements.elems
- the list of hello elementspkt
- the buffer into which the elements are to be writtenCopyright © 2015. All Rights Reserved.