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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
AuthenticatedMessageHeader.Builder
RecordBuilder for AuthenticatedMessageHeader instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public HoldingIdentity
destination
public HoldingIdentity
source
public Instant
ttl
public String
messageId
public String
traceId
public String
subsystem
public MembershipStatusFilter
statusFilter
-
Constructor Summary
Constructors Constructor Description AuthenticatedMessageHeader()
Default constructor. AuthenticatedMessageHeader(HoldingIdentity destination, HoldingIdentity source, Instant ttl, String messageId, String traceId, String subsystem, MembershipStatusFilter statusFilter)
All-args constructor.
-
Method Summary
Modifier and Type Method Description HoldingIdentity
getDestination()
Gets the value of the 'destination' field. void
setDestination(HoldingIdentity value)
Sets the value of the 'destination' field. HoldingIdentity
getSource()
Gets the value of the 'source' field. void
setSource(HoldingIdentity value)
Sets the value of the 'source' field. Instant
getTtl()
Gets the value of the 'ttl' field. void
setTtl(Instant value)
Sets the value of the 'ttl' field. String
getMessageId()
Gets the value of the 'messageId' field. void
setMessageId(String value)
Sets the value of the 'messageId' field. String
getTraceId()
Gets the value of the 'traceId' field. void
setTraceId(String value)
Sets the value of the 'traceId' field. String
getSubsystem()
Gets the value of the 'subsystem' field. void
setSubsystem(String value)
Sets the value of the 'subsystem' field. MembershipStatusFilter
getStatusFilter()
Gets the value of the 'statusFilter' field. void
setStatusFilter(MembershipStatusFilter value)
Sets the value of the 'statusFilter' field. static Schema
getClassSchema()
static BinaryMessageEncoder<AuthenticatedMessageHeader>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<AuthenticatedMessageHeader>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<AuthenticatedMessageHeader>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this AuthenticatedMessageHeader to a ByteBuffer. static AuthenticatedMessageHeader
fromByteBuffer(ByteBuffer b)
Deserializes a AuthenticatedMessageHeader from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static AuthenticatedMessageHeader.Builder
newBuilder()
Creates a new AuthenticatedMessageHeader RecordBuilder. static AuthenticatedMessageHeader.Builder
newBuilder(AuthenticatedMessageHeader.Builder other)
Creates a new AuthenticatedMessageHeader RecordBuilder by copying an existing Builder. static AuthenticatedMessageHeader.Builder
newBuilder(AuthenticatedMessageHeader other)
Creates a new AuthenticatedMessageHeader RecordBuilder by copying an existing AuthenticatedMessageHeader instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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
-
getDestination
HoldingIdentity getDestination()
Gets the value of the 'destination' field.
- Returns:
The destination identity for this message.
-
setDestination
void setDestination(HoldingIdentity value)
Sets the value of the 'destination' field. The destination identity for this message.
- Parameters:
value
- the value to set.
-
getSource
HoldingIdentity getSource()
Gets the value of the 'source' field.
- Returns:
The source identity of this message.
-
setSource
void setSource(HoldingIdentity value)
Sets the value of the 'source' field. The source identity of this message.
- Parameters:
value
- the value to set.
-
getTtl
Instant getTtl()
Gets the value of the 'ttl' field.
- Returns:
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.
-
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.
-
getMessageId
String getMessageId()
Gets the value of the 'messageId' field.
- Returns:
A unique identifier for this message. This will be used by the p2p layer to track the delivery of this specific message.
-
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.
-
getTraceId
String getTraceId()
Gets the value of the 'traceId' field.
- Returns:
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).
-
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.
-
getSubsystem
String getSubsystem()
Gets the value of the 'subsystem' field.
- Returns:
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.
-
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.
-
getStatusFilter
MembershipStatusFilter getStatusFilter()
Gets the value of the 'statusFilter' field.
- Returns:
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
-
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.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<AuthenticatedMessageHeader> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
- Returns:
the message encoder used by this class
-
getDecoder
static BinaryMessageDecoder<AuthenticatedMessageHeader> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
- Returns:
the message decoder used by this class
-
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- Returns:
a BinaryMessageDecoder instance for this class backed by the given SchemaStore
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this AuthenticatedMessageHeader to a ByteBuffer.
- Returns:
a buffer holding the serialized data for this instance
-
fromByteBuffer
static AuthenticatedMessageHeader fromByteBuffer(ByteBuffer b)
Deserializes a AuthenticatedMessageHeader from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class- Returns:
a AuthenticatedMessageHeader instance decoded from the given buffer
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static AuthenticatedMessageHeader.Builder newBuilder()
Creates a new AuthenticatedMessageHeader RecordBuilder.
- Returns:
A new AuthenticatedMessageHeader RecordBuilder
-
newBuilder
static AuthenticatedMessageHeader.Builder newBuilder(AuthenticatedMessageHeader.Builder other)
Creates a new AuthenticatedMessageHeader RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.- Returns:
A new AuthenticatedMessageHeader RecordBuilder
-
newBuilder
static AuthenticatedMessageHeader.Builder newBuilder(AuthenticatedMessageHeader other)
Creates a new AuthenticatedMessageHeader RecordBuilder by copying an existing AuthenticatedMessageHeader instance.
- Parameters:
other
- The existing instance to copy.- Returns:
A new AuthenticatedMessageHeader RecordBuilder
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-