public void stop() {
        try {
            // Send the close stream header to all connected connections
            Set<LocalSession> sessions = new HashSet<>();
            sessions.addAll(preAuthenticatedSessions.values());
            sessions.addAll(componentsSessions);
            for (LocalIncomingServerSession incomingSession : incomingServerSessions.values()) {
                sessions.add(incomingSession);
            }
            for (LocalConnectionMultiplexerSession multiplexer : connnectionManagerSessions.values()) {
                sessions.add(multiplexer);
            }

            for (LocalSession session : sessions) {
                try {
                    // Notify connected client that the server is being shut down.
                    final Connection connection = session.getConnection();
                    if (connection != null) { // The session may have been detached.
                        connection.systemShutdown();
                    }
                }
                catch (Throwable t) {
                    Log.debug("Error while sending system shutdown to session {}", session, t);
                }
            }
        }
        catch (Exception e) {
            Log.debug("Error while sending system shutdown to sessions", e);
        }
    }
Finds a client session for the provided address that has been established, but has not yet authenticated. This
method returns null if no such session can be found.

Pre-authenticated sessions aren't assigned a user-resolvable address (as no user has been authenticated). As such
the address associated with such sessions are JIDs that have a domain and resource-part, but no local-part. This
address is assigned by Openfire to a unique value, that is not expected to be known to the client.

@param address The address for which to find a pre-authenticated session (must not have a local-part).
@return the matching session if one is found, otherwise null.
xmppserver/src/main/java/org/jivesoftware/openfire/LocalSessionManager.java