Class AuthenticatedMessageHeader

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class AuthenticatedMessageHeader
    extends SpecificRecordBase implements SpecificRecord
                        
    • Constructor Detail

      • AuthenticatedMessageHeader

        AuthenticatedMessageHeader()
        Default constructor.
      • AuthenticatedMessageHeader

        AuthenticatedMessageHeader(HoldingIdentity destination, HoldingIdentity source, Instant ttl, String messageId, String traceId, String subsystem, MembershipStatusFilter statusFilter)
        All-args constructor.
        Parameters:
        destination - The destination identity for this message.
        source - The source identity of this message.
        ttl - A (time-to-live) unix timestamp (in milliseconds) after which this message will be dropped from the p2p layer.
        messageId - A unique identifier for this message.
        traceId - A trace identifier.
        subsystem - This value identifies the upstream user of the p2p layer that this message is sent from and should be received by.
        statusFilter - Indicates what type of membership information should be used for P2P communication: pending, active, active or suspended.
    • Method Detail

      • setDestination

         void setDestination(HoldingIdentity value)

        Sets the value of the 'destination' field. The destination identity for this message.

        Parameters:
        value - the value to set.
      • setSource

         void setSource(HoldingIdentity value)

        Sets the value of the 'source' field. The source identity of this message.

        Parameters:
        value - the value to set.
      • setTtl

         void setTtl(Instant value)

        Sets the value of the 'ttl' field. A (time-to-live) unix timestamp (in milliseconds) after which this message will be dropped from the p2p layer. If no ttl is specified, the p2p layer will continue replaying this message infinitely until it is delivered.

        Parameters:
        value - the value to set.
      • setMessageId

         void setMessageId(String value)

        Sets the value of the 'messageId' field. A unique identifier for this message. This will be used by the p2p layer to track the delivery of this specific message.

        Parameters:
        value - the value to set.
      • setTraceId

         void setTraceId(String value)

        Sets the value of the 'traceId' field. A trace identifier. The semantics of this field can vary based on the use-case of the upstream user, but it can be used to trace together multiple instances of the same message (e.g. in cases where the upstream user also performs replays, it can assign the same trace ID to all the instances of the same replayed message).

        Parameters:
        value - the value to set.
      • setSubsystem

         void setSubsystem(String value)

        Sets the value of the 'subsystem' field. This value identifies the upstream user of the p2p layer that this message is sent from and should be received by. It can be used to filter incoming messages from the p2p layer and process only the ones destined for a specific system.

        Parameters:
        value - the value to set.
      • setStatusFilter

         void setStatusFilter(MembershipStatusFilter value)

        Sets the value of the 'statusFilter' field. Indicates what type of membership information should be used for P2P communication: pending, active, active or suspended. Active value must be used by non-MGM services. Only MGM services will use other options

        Parameters:
        value - the value to set.
      • createDecoder

         static BinaryMessageDecoder<AuthenticatedMessageHeader> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint