final MessagingService msgService = BBMPlatformNamespace.getInstance().getMessagingService();
if(type.equals(TYPE_CHANNEL)) {
final ConnectionListenerImpl connListenerImpl = new ConnectionListenerImpl();
final BBMPlatformChannelListener channelListener = new ChannelListener(connListenerImpl);
final BBMPlatformChannel channel = msgService.createChannel(channelListener);
ChannelObject connObj = new ChannelObject(channel, true);
connListenerImpl.setConnectionObject(connObj);
return connObj;
} else if(type.equals(TYPE_SESSION)) {