public Channel newChannel ( String name , Orderer orderer , ChannelConfiguration channelConfiguration , byte [ ] ... channelConfigurationSignatures ) throws TransactionException , InvalidArgumentException { clientCheck ( ) ; if ( Utils . isNullOrEmpty ( name ) ) { throw new InvalidArgumentException ( "Channel name can not be null or empty string." ) ; } synchronized ( channels ) { if ( channels . containsKey ( name ) ) { throw new InvalidArgumentException ( format ( "Channel by the name %s already exits" , name ) ) ; } logger . trace ( "Creating channel :" + name ) ; Channel newChannel = Channel . createNewInstance ( name , this , orderer , channelConfiguration , channelConfigurationSignatures ) ; channels . put ( name , newChannel ) ; return newChannel ; } }
Create a new channel