boolean canDeliver(@Nonnull final Packet stanza) {
        // This implementation exists only for backwards compatibility purposes. When #canProcess() is removed, this
        // implementation will also be removed (every subclass is then expected to provide its own implementation of
        // the #canDeliver interface method).
        final boolean canProcess = canProcess(stanza);

        if (!canProcess) {
            LocalClientSession.returnPrivacyListErrorToSender(stanza);
        }

        return canProcess;
    }
Returns true if the specified stanza can be delivered to the entity.

Subclasses will use different criteria to determine of processing is allowed or not. For instance, client
sessions will use privacy lists while component sessions will always allow this action.

When a stanza is cannot be delivered, an implementation must take responsibility for error handling. If, for
example, an error stanza is to be sent back to the sender, this is to be performed by the implementation.

@param stanza the stanza to analyze if it must be blocked.
@return false if the specified stanza must be blocked.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalSession.java