Class ChannelConfiguration



  • public class ChannelConfiguration
    extends java.lang.Object
    A wrapper for the Hyperledger Channel configuration
    • Constructor Summary

      Constructors 
      Constructor Description
      ChannelConfiguration​()
      The null constructor for the ChannelConfiguration wrapper.
      ChannelConfiguration​(byte[] configAsBytes)
      constructs a ChannelConfiguration object
      ChannelConfiguration​(java.io.File configFile)
      constructs a ChannelConfiguration object with the actual configuration gotten from the file system
    • Constructor Detail

      • 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​(java.io.File configFile)
                             throws java.io.IOException,
                                    InvalidArgumentException
        constructs a ChannelConfiguration object with the actual configuration gotten from the file system
        Parameters:
        configFile - The file containing the channel configuration.
        Throws:
        java.io.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 Detail

      • 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