//Set the parameters
setParameters(channel, initParams);
// if the channel is a GroupChannel then add the sender, receiver, and membership service
if (channel instanceof GroupChannel) {
GroupChannel groupChannel = (GroupChannel)channel;
//Add the MembershipService
if (membership != null){
groupChannel.setMembershipService((MembershipService)membership.getInternalObject());
}
//Add Receiver
if (receiver != null){
groupChannel.setChannelReceiver((ChannelReceiver)receiver.getInternalObject());
}
//Add Sender
if (sender != null){
groupChannel.setChannelSender((ChannelSender)sender.getInternalObject());
}
} else {
log.warn(className + " is not an instance of GroupChannel. Did not set Receiver, Sender, or MembershipService");
}