Package org.hyperledger.fabric.sdk
Class BlockInfo
- java.lang.Object
 - 
- org.hyperledger.fabric.sdk.BlockInfo
 
 
- 
- Direct Known Subclasses:
 BlockEvent
public class BlockInfo extends java.lang.ObjectBlockInfo contains the data from aCommon.Block 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockInfo.EndorserInfoclassBlockInfo.EnvelopeInfoWrappers Envelopestatic classBlockInfo.EnvelopeTypeclassBlockInfo.TransactionEnvelopeInfo 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hyperledger.fabric.protos.common.Common.BlockgetBlock()longgetBlockNumber()java.lang.StringgetChannelId()byte[]getDataHash()intgetEnvelopeCount()getEnvelopeCountBlockInfo.EnvelopeInfogetEnvelopeInfo(int envelopeIndex)Return a specific envelope in the block by it's index.java.lang.Iterable<BlockInfo.EnvelopeInfo>getEnvelopeInfos()Return and iterable EnvelopeInfo over each Envelope contained in the Blockorg.hyperledger.fabric.protos.peer.PeerEvents.FilteredBlockgetFilteredBlock()byte[]getPreviousHash()intgetTransactionCount()Number of endorser transaction found in the block.byte[]getTransActionsMetaData()booleanisFiltered() 
 - 
 
- 
- 
Method Detail
- 
isFiltered
public boolean isFiltered()
 
- 
getChannelId
public java.lang.String getChannelId() throws com.google.protobuf.InvalidProtocolBufferException- Throws:
 com.google.protobuf.InvalidProtocolBufferException
 
- 
getBlock
public org.hyperledger.fabric.protos.common.Common.Block getBlock()
- Returns:
 - the raw 
Common.Block 
 
- 
getFilteredBlock
public org.hyperledger.fabric.protos.peer.PeerEvents.FilteredBlock getFilteredBlock()
- Returns:
 - the raw 
PeerEvents.FilteredBlock 
 
- 
getPreviousHash
public byte[] getPreviousHash()
- Returns:
 - the 
Common.BlockpreviousHash value and null if filtered block. 
 
- 
getDataHash
public byte[] getDataHash()
- Returns:
 - the 
Common.Blockdata hash value and null if filtered block. 
 
- 
getTransActionsMetaData
public byte[] getTransActionsMetaData()
- Returns:
 - the 
Common.Blocktransaction metadata value return null if filtered block. 
 
- 
getBlockNumber
public long getBlockNumber()
- Returns:
 - the 
Common.Blockindex number 
 
- 
getEnvelopeCount
public int getEnvelopeCount()
getEnvelopeCount- Returns:
 - the number of transactions in this block.
 
 
- 
getTransactionCount
public int getTransactionCount()
Number of endorser transaction found in the block.- Returns:
 - Number of endorser transaction found in the block.
 
 
- 
getEnvelopeInfo
public BlockInfo.EnvelopeInfo getEnvelopeInfo(int envelopeIndex) throws com.google.protobuf.InvalidProtocolBufferException
Return a specific envelope in the block by it's index.- Parameters:
 envelopeIndex-- Returns:
 - EnvelopeInfo that contains information on the envelope.
 - Throws:
 com.google.protobuf.InvalidProtocolBufferException
 
- 
getEnvelopeInfos
public java.lang.Iterable<BlockInfo.EnvelopeInfo> getEnvelopeInfos()
Return and iterable EnvelopeInfo over each Envelope contained in the Block- Returns:
 
 
 - 
 
 -