public NodeSubscription getSubscription(JID subscriberJID) {
        // Check that node does not support multiple subscriptions
        if (isMultipleSubscriptionsEnabled() && (getSubscriptions(subscriberJID).size() > 1)) {
            throw new IllegalStateException("Multiple subscriptions is enabled so subscriptions " +
                    "should be retrieved using subID.");
        }
        final NodeSubscription nodeSubscription = subscriptionsByJID.get(subscriberJID.toString());
        getLogger().trace("Got subscription by JID '{}': {}", subscriberJID, nodeSubscription);
        return nodeSubscription;
    }
Returns the subscription whose subscription JID matches the specified JID or {@code null}
if none was found. Accessing subscriptions by subscription JID and not by subscription ID
is only possible when the node does not allow multiple subscriptions from the same entity.
If the node allows multiple subscriptions and this message is sent then an
IllegalStateException exception is going to be thrown.

@param subscriberJID the JID of the entity that receives event notifications.
@return the subscription whose subscription JID matches the specified JID or {@code null}
        if none was found.
@throws IllegalStateException If this message was used when the node supports multiple
        subscriptions.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java