@Override
    public boolean canProbePresence(JID prober, String probee) throws UserNotFoundException {
        if (probee.equals(prober.getNode()) && XMPPServer.getInstance().isLocal(prober)) {
            return true;
        }
        RosterItem item = rosterManager.getRoster(probee).getRosterItem(prober);
        return item.getSubStatus() == RosterItem.SUB_FROM
                || item.getSubStatus() == RosterItem.SUB_BOTH;
    }
Simple in memory implementation of the PresenceManager interface.

@author Iain Shigeoka
xmppserver/src/main/java/org/jivesoftware/openfire/spi/PresenceManagerImpl.java