@Override
            public CompletableFuture<Void> onConnectionClosing(@Nullable Object handback) {
                return CompletableFuture.runAsync(() -> SessionManager.getInstance().removeComponentSession((LocalComponentSession) handback));
            }
Returns a newly created session between the server and a component. The session will be
created and returned only if all the checkings were correct.<p>

A domain will be bound for the new connecting component. This method is following
the JEP-114 where the domain to bind is sent in the TO attribute of the stream header.

@param serverName the name of the server where the session is connecting to.
@param xpp     the parser that is reading the provided XML through the connection.
@param connection the connection with the component.
@return a newly created session between the server and a component.
@throws XmlPullParserException if there was an XML error while creating the session.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalComponentSession.java