@Override
    public int getMajorXMPPVersion() {
        return majorVersion;
    }
Returns the session that owns this connection, if the connection has been initialized.

@return session that owns this connection.
xmppserver/src/main/java/org/jivesoftware/openfire/net/AbstractConnection.java