Class ChannelConfiguration

java.lang.Object
org.hyperledger.fabric.sdk.ChannelConfiguration

public class ChannelConfiguration extends Object
A wrapper for the Hyperledger Channel configuration
  • Constructor Details

    • ChannelConfiguration

      public ChannelConfiguration()
      The null constructor for the ChannelConfiguration wrapper. You will need to use the setChannelConfiguration(byte[]) method to populate the channel configuration
    • ChannelConfiguration

      public ChannelConfiguration(File configFile) throws IOException, InvalidArgumentException
      constructs a ChannelConfiguration object with the actual configuration gotten from the file system
      Parameters:
      configFile - The file containing the channel configuration.
      Throws:
      IOException
      InvalidArgumentException
    • ChannelConfiguration

      public ChannelConfiguration(byte[] configAsBytes) throws InvalidArgumentException
      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