Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Authentication API v8.1 SP2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.rsa.ace.techservice.udpserver
Class AcePacketHeader

    java.lang.Object
      com.rsa.ace.techservice.udpserver.AcePacketHeader

    public class AcePacketHeader

extends java.lang.Object

This class represents the packet header common to both requests and responses. This is a packet parsing/building helper class.

Field Summary
`static int` | `PACKET_HEADER_BYTES`

Constructor Summary
`AcePacketHeader(AcePacketHeader requestHeader, byte responseMessageType)` Constructs a default AcePacketHeader from a previous request.
`AcePacketHeader(java.nio.ByteBuffer buf)` Constructs an AcePacketHeader reading bytes from the stream passed.
`AcePacketHeader(byte messageType, byte protocolVersion, short applicationID, byte encode, byte options, byte circuitID)` Constructs an AcePacketHeader with all values passed.

Method Summary
`short` | `getApplicationID()` Returns the Application ID from the header.
`byte` | `getCircuitID()` Returns the Circuit ID from the header.
`byte` | `getEncode()` Returns the packet encoding (encryption) from the header.
`byte` | `getMessageType()` Message type accessor.
`byte` | `getProtocolVersion()` Returns the packet protocol version number from the header.
`void` | `setEncode(byte encodeByte)` Set the packet encoding (encryption) from the header.
`void` | `setProtocolVersion(byte protocolVersion)` Sets the packet protocol version number in the header.
`java.lang.String` | `toString()` Converts the AcePacketHeader to a string.
`void` | `writeHeader(java.nio.ByteBuffer buf)` Write an AcePacketHeader to the ByteBuffer passed.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PACKET_HEADER_BYTES

    public static final int PACKET_HEADER_BYTES

See Also:
  Constant Field Values

Constructor Detail

### AcePacketHeader

    public AcePacketHeader(AcePacketHeader requestHeader,
                           byte responseMessageType)

  Constructs a default AcePacketHeader from a previous request.

  Parameters:
    `request` - A request from which everything but the response type are taken.
    `responseMessageType` - The response message type for the header.

### AcePacketHeader

    public AcePacketHeader(java.nio.ByteBuffer buf)
                    throws AcePacketException

  Constructs an AcePacketHeader reading bytes from the stream passed.

  Parameters:
    `buf` - The byte-buffer from which the header is initialized.
  Throws:
    `AcePacketException` - If there is a problem getting the header data from the byte buffer.

### AcePacketHeader

    public AcePacketHeader(byte messageType,
                           byte protocolVersion,
                           short applicationID,
                           byte encode,
                           byte options,
                           byte circuitID)

  Constructs an AcePacketHeader with all values passed. Everything but 'high-protocol' can be defined by this constructor.

  Parameters:
    `messageType` - The header message type.
    `protocolVersion` - The protocol version.
    `applicationID` - The application ID.
    `encode` - The message encoding.
    `options` - The options field (bit-mask).
    `circuitID` - The the circuit ID for subsequent requests.

Method Detail

### getMessageType

    public byte getMessageType()

  Message type accessor. This returns the packet type.

  Returns:
    The packet type.

### getApplicationID

    public short getApplicationID()

  Returns the Application ID from the header.

  Returns:
    The application ID.

### getCircuitID

    public byte getCircuitID()

  Returns the Circuit ID from the header.

  Returns:
    The circuit ID.

### getEncode

    public byte getEncode()

  Returns the packet encoding (encryption) from the header.

  Returns:
    The 'encode' value.

### setEncode

    public void setEncode(byte encodeByte)

  Set the packet encoding (encryption) from the header.

### getProtocolVersion

    public byte getProtocolVersion()

  Returns the packet protocol version number from the header.

  Returns:
    The protocol version number.

### setProtocolVersion

    public void setProtocolVersion(byte protocolVersion)

  Sets the packet protocol version number in the header.

### writeHeader

    public void writeHeader(java.nio.ByteBuffer buf)
                     throws AcePacketException

  Write an AcePacketHeader to the ByteBuffer passed.

  Parameters:
    `buf` - The byte-buffer to which the header is written.
  Throws:
    `AcePacketException`

### toString

    public java.lang.String toString()

  Converts the AcePacketHeader to a string.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A String representation of the header.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Authentication API v8.1 SP2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved.