Package org.hyperledger.fabric.sdk
Class ChannelConfiguration
java.lang.Object
org.hyperledger.fabric.sdk.ChannelConfiguration
A wrapper for the Hyperledger Channel configuration
-
Constructor Summary
ConstructorsConstructorDescriptionThe null constructor for the ChannelConfiguration wrapper.ChannelConfiguration(byte[] configAsBytes) constructs a ChannelConfiguration objectChannelConfiguration(File configFile) constructs a ChannelConfiguration object with the actual configuration gotten from the file system -
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidsetChannelConfiguration(byte[] channelConfigurationAsBytes) sets the ChannelConfiguration from a byte array
-
Constructor Details
-
ChannelConfiguration
public ChannelConfiguration()The null constructor for the ChannelConfiguration wrapper. You will need to use thesetChannelConfiguration(byte[])method to populate the channel configuration -
ChannelConfiguration
constructs a ChannelConfiguration object with the actual configuration gotten from the file system- Parameters:
configFile- The file containing the channel configuration.- Throws:
IOExceptionInvalidArgumentException
-
ChannelConfiguration
constructs a ChannelConfiguration object- Parameters:
configAsBytes- the byte array containing the serialized channel configuration- Throws:
InvalidArgumentException
-
-
Method Details
-
setChannelConfiguration
public void setChannelConfiguration(byte[] channelConfigurationAsBytes) throws InvalidArgumentException sets the ChannelConfiguration from a byte array- Parameters:
channelConfigurationAsBytes- the byte array containing the serialized channel configuration- Throws:
InvalidArgumentException
-
getChannelConfigurationAsBytes
public byte[] getChannelConfigurationAsBytes()- Returns:
- the channel configuration serialized per protobuf and ready for inclusion into channel configuration
-