@Override
    public void stop() {
        Log.debug("SessionManager: Stopping server");
        // Stop threads that are sending packets to remote servers
        OutgoingSessionPromise.getInstance().shutdown();
        if (JiveGlobals.getBooleanProperty("shutdownMessage.enabled")) {
            sendServerMessage(null, LocaleUtils.getLocalizedString("admin.shutdown.now"));
        }
        localSessionManager.stop();
        serverName = null;

        try
        {
            // Purge our own components from the cache for the benefit of other cluster nodes.
            CacheUtil.removeValueFromMultiValuedCache( componentSessionsCache, XMPPServer.getInstance().getNodeID() );
        }
        catch ( Exception e )
        {
            Log.warn( "An exception occurred while trying to remove locally connected external components from the clustered cache. Other cluster nodes might continue to see our external components, even though we this instance is stopping.", e );
        }
    }
Sends a message with a given subject and body to one or more user sessions related to the
specified address. If address is null or the address's node is null then the message will be
sent to all the user sessions. But if the address includes a node but no resource then
the message will be sent to all the user sessions of the requested user (defined by the node).
Finally, if the address is a full JID then the message will be sent to the session associated
to the full JID. If no session is found then the message is not sent.

@param address the address that defines the sessions that will receive the message.
@param subject the subject to broadcast.
@param body    the body to broadcast.
xmppserver/src/main/java/org/jivesoftware/openfire/SessionManager.java