Namespace: OpenEdge.Messaging
Type: Class RecordBuilder
Parent Classes:
Inherits: OpenEdge.Core.Util.ConfigBuilder


/*
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Purpose:
This is the basic implementation of Record Builder. A record builder is responsible
for constructing ProducerRecord objects that an be sent by a producer to a messaging
implementation.



Method Summary
  Options Name Purpose
  OpenEdge.Messaging.RecordBuilder AddHeader (character, longchar) /** Add a header to the message, with the value specified as a LONGCHAR. @param name The name of the record header. @param val The LONGCHAR value of the record header. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder AddHeader (character, memptr) /** Add a header to the message, with the value specified as a MEMPTR @param name The name of the record header. @param val The MEMPTR value of the record header. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder AddHeader (RecordHeader) /** Add a record header that is to be added to the record when it is built. @param recordHeader The record header to add. @return This record builder. */
  OpenEdge.Messaging.IProducerRecord Build () /** Calling this generates a new producer record from the current state of the record builder. @return A record to be sent over the network by a producer. */
  OpenEdge.Messaging.ProducerRecord CreateRecord () /** Overridable method that allows messaging implementation specific creation of a particular type of record object. Only primitive data types are copied over as options. @return A producer record to be sent over the network by a producer. */
  OpenEdge.Messaging.ProducerRecord ProduceRecord () /** Overridable method that allows messaging implementation specific configuration of a record. @return A producer record to be sent over the network by a producer. */
  OpenEdge.Messaging.RecordBuilder SetBody (longchar) /** Assign the body of the message to the given longchar value. This replaces any other body already stored by the record builder The serializer configured by the producer must handle the conversion of the message to a memptr for the producer implementation. @param body The body of the record as a LONGCHAR. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetBody (memptr) /*** Assign the body of the record that will be created to the given memptr. @param body The body of the record as a MEMPTR. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetBody (Object) /** Assign the body of the message to the given object. This replaces any other body already stored by the record builder The serializer configured by the producer must handle the conversion of the message to a memptr for the producer implementation. @param body The body of the record as an Object. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetPartitionId (integer) /** Directly assign the partition id. This value will only be used if the messaging implementation supports partitions. For message implementations that support partitioning, the partition id determines which partition the record is sent to. if this value is unassigned, then the partition key will be used to determine which destination partition. @param partitionId The partition id where the record will be sent. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetPartitionKey (character) /** Assign the partition key as a string that will be used to determine the partition where the record will be sent. This may be any character value or the uknown value subject to the limitations of the producer implementation. The value may be used by the producer to determine which partition will receive the message. This value will only be used if the messaging implementation supports partitions. If the messaging implementation supports it, the record's partition id, if assigned, will be used instead of the partition key. if the partition id remains unassigned, then the partition key will be hashed to select the partition where the record will be sent. If both remain unassigned, the producer implementation is free to select a partition, and the choice will vary by messaging implementation. @param partitionKey The partition key used to select the partition where the record will be sent. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetPartitionKey (longchar) /** Assign the partition key as a longchar used to create the ProducerRecord. This may be any longchar value or the uknown value subject to the limitations of the producer implemtnation. This value may be used by the producer to determine which partition will receive the message. This value will only be used if the messaging implementation supports partitions. If the messaging implementation supports it, the record's partition id, if assigned, will be used instead of the partition key. if the partition id remains unassigned, then the partition key will be hashed to select the partition where the record will be sent. If both remain unassigned, the producer implementation is free to select a partition, and the choice will vary by messaging implementation. @param partitionKey The partition key used to select the partition where the record will be sent. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetRecordOption (character, character) /** Set a record option. The record builder may use this information to construct the final Record that is to be sent. @param the name of a record option. @param The value of the record option. @return This record builder. If name is specified as unknown or is empty, return ? */
  OpenEdge.Messaging.RecordBuilder SetTimeStamp (datetime-tz) /** Assign a timestamp of when the record was created. The producer implementation is free to use this value or assign its own timestamp to the message, if timestamps are supported. The timestamp may not be negative. @param timestamp The timestamp of when the record was constructed. @return This record builder. */
  OpenEdge.Messaging.RecordBuilder SetTopicName (character) /** The name of the topic this record is being sent to. The destination topic cannot be unknown or blank. @param topicName The name of the destination topic where the record will be sent. @return This record builder. */

Constructor Summary
  Options Name Purpose
  RecordBuilder ()

Property Summary
  Options Name Purpose
  OpenEdge.Messaging.IHeaders Headers
  Progress.Lang.Object RecordBody
  INTEGER RecordPartitionId
  Progress.Lang.Object RecordPartitionKey
  DATETIME-TZ RecordTimestamp
  CHARACTER RecordTopicName


Method Detail
Top

OpenEdge.Messaging.RecordBuilder AddHeader (character, longchar)

Purpose:
Add a header to the message, with the value specified as a LONGCHAR.
Parameters:
name CHARACTER
  The name of the record header.
val LONGCHAR
  The LONGCHAR value of the record header.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder AddHeader (character, memptr)

Purpose:
Add a header to the message, with the value specified as a MEMPTR
Parameters:
name CHARACTER
  The name of the record header.
val MEMPTR
  The MEMPTR value of the record header.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder AddHeader (RecordHeader)

Purpose:
Add a record header that is to be added to the record when it is built.
Parameters:
recordHeader OpenEdge.Messaging.RecordHeader
  The record header to add.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.IProducerRecord Build ()

Purpose:
Calling this generates a new producer record from the current state of the
record builder.
Returns OpenEdge.Messaging.IProducerRecord
  A record to be sent over the network by a producer.
Top

OpenEdge.Messaging.ProducerRecord CreateRecord ()

Purpose:
Overridable method that allows messaging implementation specific
creation of a particular type of record object.
Only primitive data types are copied over as options.
Returns OpenEdge.Messaging.ProducerRecord
  A producer record to be sent over the network by a producer.
Top

OpenEdge.Messaging.ProducerRecord ProduceRecord ()

Purpose:
Overridable method that allows messaging implementation specific
configuration of a record.
Returns OpenEdge.Messaging.ProducerRecord
  A producer record to be sent over the network by a producer.
Top

OpenEdge.Messaging.RecordBuilder SetBody (longchar)

Purpose:
Assign the body of the message to the given longchar value.
This replaces any other body already stored by the
record builder
The serializer configured by the producer must
handle the conversion of the message to a memptr for
the producer implementation.
Parameters:
body LONGCHAR
  The body of the record as a LONGCHAR.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetBody (memptr)

Assign the body of the record that will be created to the given
memptr.
Parameters:
body MEMPTR
  The body of the record as a MEMPTR.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetBody (Object)

Purpose:
Assign the body of the message to the given object.
This replaces any other body already stored by the
record builder
The serializer configured by the producer must
handle the conversion of the message to a memptr for
the producer implementation.
Parameters:
body Progress.Lang.Object
  The body of the record as an Object.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetPartitionId (integer)

Purpose:
Directly assign the partition id. This value will only be used
if the messaging implementation supports partitions. For message
implementations that support partitioning, the partition id determines
which partition the record is sent to. if this value is unassigned,
then the partition key will be used to determine which destination
partition.
Parameters:
partitionId INTEGER
  The partition id where the record will be sent.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetPartitionKey (character)

Purpose:
Assign the partition key as a string that will be used to determine the partition where the record will be sent.
This may be any character value or the uknown value subject to the limitations
of the producer implementation.
The value may be used by the producer to determine which partition will receive
the message. This value will only be used if the messaging implementation supports partitions.
If the messaging implementation supports it, the record's partition id, if assigned, will be used instead of the partition key.
if the partition id remains unassigned, then the partition key will be hashed to select the partition
where the record will be sent. If both remain unassigned, the producer implementation is free to
select a partition, and the choice will vary by messaging implementation.
Parameters:
partitionKey CHARACTER
  The partition key used to select the partition where the record will be sent.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetPartitionKey (longchar)

Purpose:
Assign the partition key as a longchar used to create the ProducerRecord.
This may be any longchar value or the uknown value subject to the limitations
of the producer implemtnation.
This value may be used by the producer to determine which partition will receive
the message. This value will only be used if the messaging implementation supports partitions.
If the messaging implementation supports it, the record's partition id, if assigned, will be used instead of the partition key.
if the partition id remains unassigned, then the partition key will be hashed to select the partition
where the record will be sent. If both remain unassigned, the producer implementation is free to
select a partition, and the choice will vary by messaging implementation.
Parameters:
partitionKey LONGCHAR
  The partition key used to select the partition where the record will be sent.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetRecordOption (character, character)

Purpose:
Set a record option. The record builder may use this information to construct
the final Record that is to be sent.
Parameters:
name CHARACTER
 
val CHARACTER
 
Returns OpenEdge.Messaging.RecordBuilder
  This record builder. If name is specified as unknown or is empty, return ?
Top

OpenEdge.Messaging.RecordBuilder SetTimeStamp (datetime-tz)

Purpose:
Assign a timestamp of when the record was created.
The producer implementation is free to use this value or
assign its own timestamp to the message, if timestamps are supported.
The timestamp may not be negative.
Parameters:
timestamp DATETIME-TZ
  The timestamp of when the record was constructed.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.
Top

OpenEdge.Messaging.RecordBuilder SetTopicName (character)

Purpose:
The name of the topic this record is being sent to. The destination topic
cannot be unknown or blank.
Parameters:
topicName CHARACTER
  The name of the destination topic where the record will be sent.
Returns OpenEdge.Messaging.RecordBuilder
  This record builder.


Constructor Detail
Top

RecordBuilder ()



Property Detail
Top

OpenEdge.Messaging.IHeaders Headers

Returns OpenEdge.Messaging.IHeaders
 
Top

Progress.Lang.Object RecordBody

Returns Progress.Lang.Object
 
Top

INTEGER RecordPartitionId

Returns INTEGER
 
Top

Progress.Lang.Object RecordPartitionKey

Returns Progress.Lang.Object
 
Top

DATETIME-TZ RecordTimestamp

Returns DATETIME-TZ
 
Top

CHARACTER RecordTopicName

Returns CHARACTER