Package org.hyperledger.fabric.sdk
Class UpdateChannelConfiguration
java.lang.Object
org.hyperledger.fabric.sdk.UpdateChannelConfiguration
A wrapper for the Hyperledger Channel update configuration
-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor for the UpdateChannelConfiguration wrapper.UpdateChannelConfiguration(byte[] configAsBytes) constructs a UpdateChannelConfiguration objectUpdateChannelConfiguration(File configFile) constructs a UpdateChannelConfiguration object with the actual configuration gotten from the file system -
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidsetUpdateChannelConfiguration(byte[] updateChannelConfigurationAsBytes) sets the UpdateChannelConfiguration from a byte array
-
Constructor Details
-
UpdateChannelConfiguration
public UpdateChannelConfiguration()The constructor for the UpdateChannelConfiguration wrapper. You will need to use theChannel.updateChannelConfiguration(UpdateChannelConfiguration, byte[]...)method to populate the update channel configuration -
UpdateChannelConfiguration
constructs a UpdateChannelConfiguration object with the actual configuration gotten from the file system- Parameters:
configFile- The file containing the channel configuration.- Throws:
IOExceptionInvalidArgumentException
-
UpdateChannelConfiguration
constructs a UpdateChannelConfiguration object- Parameters:
configAsBytes- the byte array containing the serialized channel configuration- Throws:
InvalidArgumentException
-
-
Method Details
-
setUpdateChannelConfiguration
public void setUpdateChannelConfiguration(byte[] updateChannelConfigurationAsBytes) throws InvalidArgumentException sets the UpdateChannelConfiguration from a byte array- Parameters:
updateChannelConfigurationAsBytes- the byte array containing the serialized channel configuration- Throws:
InvalidArgumentException
-
getUpdateChannelConfigurationAsBytes
public byte[] getUpdateChannelConfigurationAsBytes()- Returns:
- the channel configuration serialized per protobuf and ready for inclusion into channel configuration
-