Connection with openfire

Hello

i was using older version of smack and i am connection openfire server with below code

public ConnectionConfiguration config = new ConnectionConfiguration(“server domain”, 5222);

public XMPPConnection connection = new XMPPConnection(config);

connection.connect();

connection.login(username, password);

but now i am migrated to smack-core 4.2.0 and this methods doesn’t exits in this library so how do i managet to connection with server?

Anybody have any idea ??