Openfire delegate user while sending message

I am writing a openfire middleware, so I wanted to create the connection using smack with admin user and password but need to send the message with a proxy user(impersonate). So, same connection can be reused but with impersonating with another user.So, how can we achieve this using open-fire and smack library.