com.neeve.pkt
Class PktSubheader

java.lang.Object
  extended by com.neeve.util.UtlListElement
      extended by com.neeve.pkt.PktSerializable
          extended by com.neeve.pkt.PktBody
              extended by com.neeve.pkt.PktSubheader
All Implemented Interfaces:
com.neeve.io.IOElasticBuffer.Initializer, com.neeve.io.IOElasticBuffer.Sizer
Direct Known Subclasses:
PktSubheaderFixed, PktSubheaderVariable

public abstract class PktSubheader
extends PktBody

Base class for packet subheaders.

Threading:
Packet bodies are not safe for concurrent access by multiple threads.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.neeve.pkt.PktSerializable
PktSerializable.DeserializeContext, PktSerializable.SerializeContext
 
Field Summary
static int PREAMBLE_LENGTH
           
static int PREAMBLE_LENGTH_V1
           
static byte V1
           
static byte VERSION
           
 
Fields inherited from class com.neeve.util.UtlListElement
count, head, next, prev
 
Method Summary
abstract  int getSerializedLength(ByteBuffer buffer, int offset)
          Get the serialized length from the serialized form
static int getType(ByteBuffer buffer, int offset)
          Get the subheader type from a serialized subheader preamble.
 
Methods inherited from class com.neeve.pkt.PktBody
deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, dump, getBuffer, getInitialBufferLength, getSerializedLength, getType, initializeBuffer, isNative, reset, serialize, serialize, serialize, serialize, serialize, serialize, serialize
 
Methods inherited from class com.neeve.pkt.PktSerializable
deserialize, getDeserializationPolicy, getSerializationPolicy, isValidDeserializationPolicy, isValidSerializationPolicy, serialize, setDeserializationPolicy, setSerializationPolicy
 
Methods inherited from class com.neeve.util.UtlListElement
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

V1

public static final byte V1
See Also:
Constant Field Values

VERSION

public static final byte VERSION
See Also:
Constant Field Values

PREAMBLE_LENGTH_V1

public static final int PREAMBLE_LENGTH_V1
See Also:
Constant Field Values

PREAMBLE_LENGTH

public static final int PREAMBLE_LENGTH
See Also:
Constant Field Values
Method Detail

getType

public static final int getType(ByteBuffer buffer,
                                int offset)
Get the subheader type from a serialized subheader preamble.

Returns:
Returns the packet type
Threading:
This method is not safe for concurrent access by multiple threads

getSerializedLength

public abstract int getSerializedLength(ByteBuffer buffer,
                                        int offset)
Get the serialized length from the serialized form



Copyright © 2016 Neeve Research, LLC. All Rights Reserved.