Package org.apache.synapse.transport.http.conn

# Class ReplayRecord

java.lang.Object
org.apache.synapse.transport.http.conn.ReplayRecord

public class ReplayRecord extends Object
Represents a single replay record that encapsulates message content and associated metadata for replay purposes.

See Also:
  - `for writing and persisting replay records.`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReplayRecord(String messageId, Map<String,Object> metadata, byte[] data)`
  Constructs a new replay record instance containing the unique message ID, metadata, and raw data of the message.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getData()`
  Returns the raw binary message data contained in this record.
  `String`
  `getMessageId()`
  Returns the unique identifier associated with this replay record.
  `Map<String,Object>`
  `getMetadata()`
  Returns metadata associated with this record.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ReplayRecord

    public ReplayRecord(String messageId, Map<String,Object> metadata, byte[] data)
    Constructs a new replay record instance containing the unique message ID, metadata, and raw data of the message.
    Parameters:
      `messageId` - a unique identifier for the replayed message; may not be null
      `metadata` - map containing message context metadata; may be null if not applicable
      `data` - byte array containing the message payload; may be null or empty

- ## Method Details

  - ### getMessageId

    public String getMessageId()
    Returns the unique identifier associated with this replay record.
    Returns:
      message ID string

  - ### getMetadata

    public Map<String,Object> getMetadata()
    Returns metadata associated with this record. The metadata includes contextual information such as API name, version, transport headers, or other attributes recorded at replay capture time.
    Returns:
      metadata map, or null if no metadata is available

  - ### getData

    public byte[] getData()
    Returns the raw binary message data contained in this record.
    Returns:
      byte array of message data, or null if not set