void setChannel ( Channel channel ) throws InvalidArgumentException { if ( null != this . channel ) { throw new InvalidArgumentException ( format ( "Can not add peer %s to channel %s because it already belongs to channel %s." , name , channel . getName ( ) , this . channel . getName ( ) ) ) ; } logger . debug ( format ( "%s setting channel to %s, from %s" , toString ( ) , "" + channel , "" + this . channel ) ) ; this . channel = channel ; this . channelName = channel . getName ( ) ; }
Set the channel the peer is on .