// Check it's valid, throw if not
if (channelContainer == null)
throw new NullPointerException(
"cannot get channel container adapter");
// Create channel ID with fixed name 'channel2'
final ID channelID = IDFactory.getDefault().createID(
channelContainer.getChannelNamespace(), "channel2");
// Setup listener so then when channelmessageevents are received that
// they present in UI
final IChannelListener channelListener = new IChannelListener() {
public void handleChannelEvent(final IChannelEvent event) {