@Override
                    public int compare(ClientSession o1, ClientSession o2)
                    {
                        int thisVal = getShowValue(o1);
                        int anotherVal = getShowValue(o2);
                        return (Integer.compare(thisVal, anotherVal));
                    }
Deliver the message sent to the bare JID of a local user to the best connected resource. If the
target user is not online then messages will be stored offline according to the offline strategy.
However, if the user is connected from only one resource then the message will be delivered to
that resource. In the case that the user is connected from many resources the logic will be the
following:
<ol>
 <li>Select resources with highest priority</li>
 <li>Select resources with highest show value (chat, available, away, xa, dnd)</li>
 <li>Select resource with most recent activity</li>
</ol>

Admins can override the above logic and just send the message to all connected resources
with highest priority by setting the system property {@code route.all-resources} to
{@code true}.

@param recipientJID the bare JID of the target local user.
@param packet the message to send.
@return true if at least one target session was found
xmppserver/src/main/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java