private int getShowValue(ClientSession session)
                    {
                        Presence.Show show = session.getPresence().getShow();
                        if (show == Presence.Show.chat) {
                            return 1;
                        } else if (show == null) {
                            return 2;
                        } else if (show == Presence.Show.away) {
                            return 3;
                        } else if (show == Presence.Show.xa) {
                            return 4;
                        } else {
                            return 5;
                        }
                    }
Priorities are: chat, available, away, xa, dnd.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java