use of org.xwiki.observation.remote.jgroups.JGroupsReceiver in project xwiki-platform by xwiki.
the class JGroupsNetworkAdapter method createChannel.
/**
* Create a new channel.
*
* @param channelId the identifier of the channel to create
* @return the new channel
* @throws Exception failed to create new channel
*/
private JChannel createChannel(String channelId) throws Exception {
// load configuration
ProtocolStackConfigurator channelConf = loadChannelConfiguration(channelId);
// get Receiver
JGroupsReceiver channelReceiver;
try {
channelReceiver = this.componentManager.getInstance(JGroupsReceiver.class, channelId);
} catch (ComponentLookupException e) {
channelReceiver = this.componentManager.getInstance(JGroupsReceiver.class);
}
// create channel
JChannel channel = new JChannel(channelConf);
channel.setReceiver(channelReceiver);
channel.setDiscardOwnMessages(true);
return channel;
}
Aggregations