public final class ChannelHeader extends com.google.protobuf.GeneratedMessageV3 implements ChannelHeaderOrBuilder
Header is a generic replay prevention and identity message to include in a signed payloadProtobuf type
common.ChannelHeader
Modifier and Type | Class and Description |
---|---|
static class |
ChannelHeader.Builder
Header is a generic replay prevention and identity message to include in a signed payload
|
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
CHANNEL_ID_FIELD_NUMBER |
static int |
EPOCH_FIELD_NUMBER |
static int |
EXTENSION_FIELD_NUMBER |
static int |
TIMESTAMP_FIELD_NUMBER |
static int |
TLS_CERT_HASH_FIELD_NUMBER |
static int |
TX_ID_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getChannelId()
Identifier of the channel this message is bound for
|
com.google.protobuf.ByteString |
getChannelIdBytes()
Identifier of the channel this message is bound for
|
static ChannelHeader |
getDefaultInstance() |
ChannelHeader |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
long |
getEpoch()
The epoch in which this header was generated, where epoch is defined based on block height
Epoch in which the response has been generated.
|
com.google.protobuf.ByteString |
getExtension()
Extension that may be attached based on the header type
|
com.google.protobuf.Parser<ChannelHeader> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.Timestamp |
getTimestamp()
Timestamp is the local time when the message was created
by the sender
|
com.google.protobuf.TimestampOrBuilder |
getTimestampOrBuilder()
Timestamp is the local time when the message was created
by the sender
|
com.google.protobuf.ByteString |
getTlsCertHash()
If mutual TLS is employed, this represents
the hash of the client's TLS certificate
|
String |
getTxId()
An unique identifier that is used end-to-end.
|
com.google.protobuf.ByteString |
getTxIdBytes()
An unique identifier that is used end-to-end.
|
int |
getType()
Header types 0-10000 are reserved and defined by HeaderType
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
getVersion()
Version indicates message protocol version
|
int |
hashCode() |
boolean |
hasTimestamp()
Timestamp is the local time when the message was created
by the sender
|
boolean |
isInitialized() |
static ChannelHeader.Builder |
newBuilder() |
static ChannelHeader.Builder |
newBuilder(ChannelHeader prototype) |
ChannelHeader.Builder |
newBuilderForType() |
static ChannelHeader |
parseDelimitedFrom(InputStream input) |
static ChannelHeader |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ChannelHeader |
parseFrom(byte[] data) |
static ChannelHeader |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ChannelHeader |
parseFrom(ByteBuffer data) |
static ChannelHeader |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ChannelHeader |
parseFrom(com.google.protobuf.ByteString data) |
static ChannelHeader |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ChannelHeader |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ChannelHeader |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ChannelHeader |
parseFrom(InputStream input) |
static ChannelHeader |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ChannelHeader> |
parser() |
ChannelHeader.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
findInitializationErrors, getInitializationErrorString, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int TYPE_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
public static final int TIMESTAMP_FIELD_NUMBER
public static final int CHANNEL_ID_FIELD_NUMBER
public static final int TX_ID_FIELD_NUMBER
public static final int EPOCH_FIELD_NUMBER
public static final int EXTENSION_FIELD_NUMBER
public static final int TLS_CERT_HASH_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
public int getType()
Header types 0-10000 are reserved and defined by HeaderType
int32 type = 1 [json_name = "type"];
getType
in interface ChannelHeaderOrBuilder
public int getVersion()
Version indicates message protocol version
int32 version = 2 [json_name = "version"];
getVersion
in interface ChannelHeaderOrBuilder
public boolean hasTimestamp()
Timestamp is the local time when the message was created by the sender
.google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"];
hasTimestamp
in interface ChannelHeaderOrBuilder
public com.google.protobuf.Timestamp getTimestamp()
Timestamp is the local time when the message was created by the sender
.google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"];
getTimestamp
in interface ChannelHeaderOrBuilder
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder()
Timestamp is the local time when the message was created by the sender
.google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"];
getTimestampOrBuilder
in interface ChannelHeaderOrBuilder
public String getChannelId()
Identifier of the channel this message is bound for
string channel_id = 4 [json_name = "channelId"];
getChannelId
in interface ChannelHeaderOrBuilder
public com.google.protobuf.ByteString getChannelIdBytes()
Identifier of the channel this message is bound for
string channel_id = 4 [json_name = "channelId"];
getChannelIdBytes
in interface ChannelHeaderOrBuilder
public String getTxId()
An unique identifier that is used end-to-end. - set by higher layers such as end user or SDK - passed to the endorser (which will check for uniqueness) - as the header is passed along unchanged, it will be be retrieved by the committer (uniqueness check here as well) - to be stored in the ledger
string tx_id = 5 [json_name = "txId"];
getTxId
in interface ChannelHeaderOrBuilder
public com.google.protobuf.ByteString getTxIdBytes()
An unique identifier that is used end-to-end. - set by higher layers such as end user or SDK - passed to the endorser (which will check for uniqueness) - as the header is passed along unchanged, it will be be retrieved by the committer (uniqueness check here as well) - to be stored in the ledger
string tx_id = 5 [json_name = "txId"];
getTxIdBytes
in interface ChannelHeaderOrBuilder
public long getEpoch()
The epoch in which this header was generated, where epoch is defined based on block height Epoch in which the response has been generated. This field identifies a logical window of time. A proposal response is accepted by a peer only if two conditions hold: 1. the epoch specified in the message is the current epoch 2. this message has been only seen once during this epoch (i.e. it hasn't been replayed)
uint64 epoch = 6 [json_name = "epoch"];
getEpoch
in interface ChannelHeaderOrBuilder
public com.google.protobuf.ByteString getExtension()
Extension that may be attached based on the header type
bytes extension = 7 [json_name = "extension"];
getExtension
in interface ChannelHeaderOrBuilder
public com.google.protobuf.ByteString getTlsCertHash()
If mutual TLS is employed, this represents the hash of the client's TLS certificate
bytes tls_cert_hash = 8 [json_name = "tlsCertHash"];
getTlsCertHash
in interface ChannelHeaderOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static ChannelHeader parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static ChannelHeader parseFrom(InputStream input) throws IOException
IOException
public static ChannelHeader parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ChannelHeader parseDelimitedFrom(InputStream input) throws IOException
IOException
public static ChannelHeader parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ChannelHeader parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static ChannelHeader parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public ChannelHeader.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static ChannelHeader.Builder newBuilder()
public static ChannelHeader.Builder newBuilder(ChannelHeader prototype)
public ChannelHeader.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
public static ChannelHeader getDefaultInstance()
public static com.google.protobuf.Parser<ChannelHeader> parser()
public com.google.protobuf.Parser<ChannelHeader> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public ChannelHeader getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2022. All rights reserved.