public Boolean isSubscribed ( String channel ) { Boolean result = null ; /* * Sanity checks */ if ( ! isConnected ) { raiseOrtcEvent ( EventEnum . OnException , this , new OrtcNotConnectedException ( ) ) ; } else if ( Strings . isNullOrEmpty ( channel ) ) { raiseOrtcEvent ( EventEnum . OnException , this , new OrtcEmptyFieldException ( "Channel" ) ) ; } else if ( ! Strings . ortcIsValidInput ( channel ) ) { raiseOrtcEvent ( EventEnum . OnException , this , new OrtcInvalidCharactersException ( "Channel" ) ) ; } else { ChannelSubscription subscribedChannel = subscribedChannels . get ( channel ) ; result = subscribedChannel != null && subscribedChannel . isSubscribed ( ) ; } return result ; }
Indicates if the channel is subscribed