com.neeve.pkt
Class PktSubheaderHSpace

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
                  extended by com.neeve.pkt.PktSubheaderVariable
                      extended by com.neeve.pkt.PktSubheaderHSpace
All Implemented Interfaces:
PktBuffer.Initializer

public final class PktSubheaderHSpace
extends PktSubheaderVariable

The Hierarchical Space packet subheader.

This class is the subheader used to contain control information exchanged between an hspace client and a data server and between communicating data servers.

This packet subheader header is a versioned entity. The subheader version defines the format of the subheader i.e. what fields comprise the subheader and their relative locations when serialized. A crucial aspect of subheader versioning is that a version N subheader will always be a subset of a version M subheader where N < M i.e. all fields in version N of a subheader will be present and in the same position as fields in version M of the subheader. i.e. a subheader never shrinks or moves fields around. With time, the subheader can only grow. See the setter/getter method documentation for information on which subheader version the fields that they affect belong to.

Threading:
Packet subheaders 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 FLAG_KEYONLY
          Specifies to only get the key.
static int FLAG_NO_INITIAL_IMAGE
          Specifies not to return an initial image.
static int FLAG_REMOVE
          Specifies to remove an object.
static byte OPCODE_GET
          Identifies a GET request or reply.
static byte OPCODE_GETCANCEL
          Identifies a GETCANCEL request
static byte OPCODE_NONE
          Identifies a NULL opcode.
static byte OPCODE_NOTIFY
          Identifies a POST change notification.
static byte OPCODE_POST
          Identifies a POST request or initial image
static byte OPCODE_POSTCANCEL
          Identifies a POSTCANCEL request
static byte OPCODE_PUT
          Identifies a PUT request.
static byte OPCODE_REMOVE
          Identifies a REMOVE request
static byte SEMANTIC_ASYNC
          Denotes the ASYNC semantic
static byte SEMANTIC_NONE
          Denotes no semantic
static byte SEMANTIC_NOREPLY
          Denotes the NOREPLY semantic
static byte SEMANTIC_PIPELINED
          Denotes the PIPELINED semantic
static byte SEMANTIC_SYNC
          Denotes the SYNC semantic
static byte TRIGGER_ADD
          Denotes the ADD trigger
static byte TRIGGER_NONE
          Denotes no trigger
static byte TRIGGER_REMOVE
          Denotes the REMOVE trigger
static byte TRIGGER_UPDATE
          Denotes the UPDATE trigger
 
Fields inherited from class com.neeve.pkt.PktSubheader
PREAMBLE_LENGTH, PREAMBLE_LENGTH_V1
 
Fields inherited from class com.neeve.util.UtlListElement
count, head, next, prev
 
Method Summary
static PktBody create()
          Creates a default HSPACE subheader
static PktBody create(Properties props)
          Creates an HSPACE subheader
 int doGetSerializedLength()
          Implementation of PktBody.doGetSerializedLength()
 boolean equals(Object obj)
          Indicates whether some other object is equal to this one.
 boolean getFlagKeyOnly()
          Get the 'keyonly' flag (V1 Subheader Field).
 boolean getFlagNoInitialImage()
          Get the 'no initial image' flag (V1 Subheader Field).
 boolean getFlagRemove()
          Get the 'remove' flag (V1 Subheader Field).
 int getFlags()
          Get the flags (V1 Subheader Field).
 String getKey()
          Get the key (V1 Subheader Field).
static short getLatestSubheaderVersion()
          Get the latest subheader version.
 byte getOpCode()
          Get the opcode (V1 Subheader Field).
 byte getSemantic()
          Get the operation semantic (V1 Subheader Field).
 int getSerializedLength(ByteBuffer buffer)
          Implementation of PktSubheader.getSerializedLength(ByteBuffer)
 short getSubheaderVersion()
          Get the header format version (V1 Subheader Field).
 int getTimeout()
          Get the timeout (V1 Subheader Field).
 byte getTriggers()
          Get the notification triggers (V1 Subheader Field).
 int hashCode()
          Returns the hashcode for this object
 void initialize()
          Implementation of PktBody.initialize()
 void initializeBuffer()
          Implementation of PktBuffer.Initializer.initializeBuffer()
 void setAddTrigger(boolean val)
          Set the 'add' notification trigger (V1 Subheader Field).
 void setFlagKeyOnly(boolean val)
          Set the 'keyonly' flag (V1 Subheader Field).
 void setFlagNoInitialImage(boolean val)
          Set the 'no initial mage' flag (V1 Subheader Field).
 void setFlagRemove(boolean val)
          Set the 'remove' flag (V1 Subheader Field).
 void setFlags(int flags)
          Set the flags (V1 Subheader Field).
 void setKey(String key)
          Set the key (V1 Subheader Field).
 void setOpCode(byte opcode)
          Set the opcode (V1 Subheader Field).
 void setRemoveTrigger(boolean val)
          Set the 'remove' notification trigger (V1 Subheader Field).
 void setSemantic(byte semantic)
          Set the operation semantic (V1 Subheader Field).
 void setTimeout(int timeout)
          Set the timeout (V1 Subheader Field).
 void setTriggers(byte triggers)
          Set the notification triggers (V1 Subheader Field).
 void setUpdateTrigger(boolean val)
          Set the 'update' notification trigger (V1 Subheader Field).
 String toString()
          Returns a string representation of the object
 
Methods inherited from class com.neeve.pkt.PktSubheader
getType
 
Methods inherited from class com.neeve.pkt.PktBody
deserialize, getBuffer, getSerializedLength, getType, isNative, reset, 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
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OPCODE_NONE

public static final byte OPCODE_NONE
Identifies a NULL opcode.

See Also:
Constant Field Values

OPCODE_PUT

public static final byte OPCODE_PUT
Identifies a PUT request.

See Also:
Constant Field Values

OPCODE_GET

public static final byte OPCODE_GET
Identifies a GET request or reply.

See Also:
Constant Field Values

OPCODE_GETCANCEL

public static final byte OPCODE_GETCANCEL
Identifies a GETCANCEL request

See Also:
Constant Field Values

OPCODE_POST

public static final byte OPCODE_POST
Identifies a POST request or initial image

See Also:
Constant Field Values

OPCODE_POSTCANCEL

public static final byte OPCODE_POSTCANCEL
Identifies a POSTCANCEL request

See Also:
Constant Field Values

OPCODE_REMOVE

public static final byte OPCODE_REMOVE
Identifies a REMOVE request

See Also:
Constant Field Values

OPCODE_NOTIFY

public static final byte OPCODE_NOTIFY
Identifies a POST change notification.

See Also:
Constant Field Values

SEMANTIC_NONE

public static final byte SEMANTIC_NONE
Denotes no semantic

See Also:
Constant Field Values

SEMANTIC_SYNC

public static final byte SEMANTIC_SYNC
Denotes the SYNC semantic

See Also:
Constant Field Values

SEMANTIC_PIPELINED

public static final byte SEMANTIC_PIPELINED
Denotes the PIPELINED semantic

See Also:
Constant Field Values

SEMANTIC_ASYNC

public static final byte SEMANTIC_ASYNC
Denotes the ASYNC semantic

See Also:
Constant Field Values

SEMANTIC_NOREPLY

public static final byte SEMANTIC_NOREPLY
Denotes the NOREPLY semantic

See Also:
Constant Field Values

TRIGGER_NONE

public static final byte TRIGGER_NONE
Denotes no trigger

See Also:
Constant Field Values

TRIGGER_ADD

public static final byte TRIGGER_ADD
Denotes the ADD trigger

See Also:
Constant Field Values

TRIGGER_UPDATE

public static final byte TRIGGER_UPDATE
Denotes the UPDATE trigger

See Also:
Constant Field Values

TRIGGER_REMOVE

public static final byte TRIGGER_REMOVE
Denotes the REMOVE trigger

See Also:
Constant Field Values

FLAG_REMOVE

public static final int FLAG_REMOVE
Specifies to remove an object.

See Also:
Constant Field Values

FLAG_NO_INITIAL_IMAGE

public static final int FLAG_NO_INITIAL_IMAGE
Specifies not to return an initial image.

See Also:
Constant Field Values

FLAG_KEYONLY

public static final int FLAG_KEYONLY
Specifies to only get the key.

See Also:
Constant Field Values
Method Detail

create

public static PktBody create(Properties props)
Creates an HSPACE subheader

Parameters:
props - The property set to use to qualify creation of the body.

create

public static PktBody create()
Creates a default HSPACE subheader


initialize

public final void initialize()
Implementation of PktBody.initialize()


doGetSerializedLength

public final int doGetSerializedLength()
Implementation of PktBody.doGetSerializedLength()


getSerializedLength

public final int getSerializedLength(ByteBuffer buffer)
Implementation of PktSubheader.getSerializedLength(ByteBuffer)

Specified by:
getSerializedLength in class PktSubheader

getLatestSubheaderVersion

public static final short getLatestSubheaderVersion()
Get the latest subheader version.

This method returns the latest subheader version i.e. the version used when subheaders are created explicitly i.e. not through deserialization

Threading:
This method is safe for concurrent access by multiple threads

getSubheaderVersion

public final short getSubheaderVersion()
Get the header format version (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setOpCode

public final void setOpCode(byte opcode)
Set the opcode (V1 Subheader Field).

Parameters:
opcode - The opcode to set.
Threading:
This method is not safe for concurrent access by multiple threads

getOpCode

public final byte getOpCode()
Get the opcode (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setSemantic

public final void setSemantic(byte semantic)
Set the operation semantic (V1 Subheader Field).

Parameters:
semantic - The semantic to set.
Threading:
This method is not safe for concurrent access by multiple threads

getSemantic

public final byte getSemantic()
Get the operation semantic (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setAddTrigger

public final void setAddTrigger(boolean val)
Set the 'add' notification trigger (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setUpdateTrigger

public final void setUpdateTrigger(boolean val)
Set the 'update' notification trigger (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setRemoveTrigger

public final void setRemoveTrigger(boolean val)
Set the 'remove' notification trigger (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setTriggers

public final void setTriggers(byte triggers)
Set the notification triggers (V1 Subheader Field).

Parameters:
triggers - The triggers to set.
Threading:
This method is not safe for concurrent access by multiple threads

getTriggers

public final byte getTriggers()
Get the notification triggers (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setTimeout

public final void setTimeout(int timeout)
Set the timeout (V1 Subheader Field).

Parameters:
timeout - The timeout to set.
Threading:
This method is not safe for concurrent access by multiple threads

getTimeout

public final int getTimeout()
Get the timeout (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setFlagRemove

public final void setFlagRemove(boolean val)
Set the 'remove' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setFlagNoInitialImage

public final void setFlagNoInitialImage(boolean val)
Set the 'no initial mage' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setFlagKeyOnly

public final void setFlagKeyOnly(boolean val)
Set the 'keyonly' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setFlags

public final void setFlags(int flags)
Set the flags (V1 Subheader Field).

Parameters:
flags - The flags to set.
Threading:
This method is not safe for concurrent access by multiple threads

getFlagRemove

public final boolean getFlagRemove()
Get the 'remove' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

getFlagNoInitialImage

public final boolean getFlagNoInitialImage()
Get the 'no initial image' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

getFlagKeyOnly

public final boolean getFlagKeyOnly()
Get the 'keyonly' flag (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

getFlags

public final int getFlags()
Get the flags (V1 Subheader Field).

Threading:
This method is not safe for concurrent access by multiple threads

setKey

public final void setKey(String key)
Set the key (V1 Subheader Field).

Threading:
This method is safe for concurrent access by multiple threads

getKey

public final String getKey()
Get the key (V1 Subheader Field).

The key returned by this method can be null.

Threading:
This method is safe for concurrent access by multiple threads

initializeBuffer

public final void initializeBuffer()
Implementation of PktBuffer.Initializer.initializeBuffer()

Specified by:
initializeBuffer in interface PktBuffer.Initializer
Overrides:
initializeBuffer in class PktBody

toString

public final String toString()
Returns a string representation of the object

Overrides:
toString in class Object
Threading:
This method is safe for concurrent access by multiple threads

equals

public final boolean equals(Object obj)
Indicates whether some other object is equal to this one.

Overrides:
equals in class Object

hashCode

public final int hashCode()
Returns the hashcode for this object

Overrides:
hashCode in class Object


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