public void subscribeWithFilter ( String channel , boolean subscribeOnReconnect , String filter , OnMessageWithFilter onMessageWithFilter ) { ChannelSubscription subscribedChannel = subscribedChannels . get ( channel ) ; Pair < Boolean , String > subscribeValidation = isSubscribeValid ( channel , subscribedChannel ) ; if ( subscribeValidation != null && subscribeValidation . first ) { subscribedChannel = new ChannelSubscription ( subscribeOnReconnect , onMessageWithFilter ) ; subscribedChannel . setFilter ( filter ) ; subscribedChannel . setWithFilter ( true ) ; subscribedChannel . setSubscribing ( true ) ; subscribedChannels . put ( channel , subscribedChannel ) ; subscribe ( channel , subscribeValidation . second , true , filter ) ; } }
subscribeWithFilter the specified channel with a given filter in order to receive filtered messages in that channel