default CompletableFuture<Void> onConnectionClosing(@Nullable final Object handback)
    {
        // The default implementation is a blocking invocation of the method that is being replaced: onConnectionClose()
        // This is designed to facilitate a graceful migration, where pre-existing implementations of this interface
        // will continue to work without change. When the deprecated method is deleted, this default implementation
        // should also be removed.
        try {
            onConnectionClose(handback);
        } catch (Throwable t) {
            return CompletableFuture.failedFuture(t);
        }
        return CompletableFuture.completedFuture(null);
    }
Called when a connection is being closed.

This method is intended to be used to start asynchronous processes. The Future that is returned is to be used
to status of such an asynchronous process.

@param handback The handback object associated with the connection listener during Connection.registerCloseListener()
@return a Future representing pending completion of the event listener invocation.
xmppserver/src/main/java/org/jivesoftware/openfire/ConnectionCloseListener.java