How to know when refuse subscribe build on smack4.1.3?

the project built on smack4.1.3.there have two users,A and B.

A send a subscribe presence to B. then B want to refuse it.so send a unsubscribed presence to A.

A received this unsubscribed presence and process it.

my issue is that in smack Roster.java there have a iqHandler to process IQ message(subscription) and update entries.and i can get the accounts that have updated(when refused,item type will update to none from pending_out) through RosterListener.entriesUpdated method.

but how to know this operation is refuse subscription instead of others in my project?

thanks for answers!

but how to know this operation is refuse subscription instead of others in my project?

Is there another operation besides rejecting the subscription request that will change the state from “Pending Out” to “None”?

no,the message process procedure is IQHandler(update Roster state and then notify RosterListener) -> StanzaListener.

the IQHandler stored with Map(key:iq namespace),so i can`t implement my custom IQHandler.