Package org.hyperledger.fabric.sdk
Class ChannelConfiguration
- java.lang.Object
-
- org.hyperledger.fabric.sdk.ChannelConfiguration
-
public class ChannelConfiguration extends java.lang.ObjectA 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 objectChannelConfiguration(java.io.File configFile)constructs a ChannelConfiguration object with the actual configuration gotten from the file system
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getChannelConfigurationAsBytes()voidsetChannelConfiguration(byte[] channelConfigurationAsBytes)sets the ChannelConfiguration from a byte array
-
-
-
Constructor Detail
-
ChannelConfiguration
public ChannelConfiguration()
The null constructor for the ChannelConfiguration wrapper. You will need to use thesetChannelConfiguration(byte[])method to populate the channel configuration
-
ChannelConfiguration
public ChannelConfiguration(java.io.File configFile) throws java.io.IOException, InvalidArgumentExceptionconstructs a ChannelConfiguration object with the actual configuration gotten from the file system- Parameters:
configFile- The file containing the channel configuration.- Throws:
java.io.IOExceptionInvalidArgumentException
-
ChannelConfiguration
public ChannelConfiguration(byte[] configAsBytes) throws InvalidArgumentExceptionconstructs a ChannelConfiguration object- Parameters:
configAsBytes- the byte array containing the serialized channel configuration- Throws:
InvalidArgumentException
-
-
Method Detail
-
setChannelConfiguration
public void setChannelConfiguration(byte[] channelConfigurationAsBytes) throws InvalidArgumentExceptionsets 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
-
-