How to get chat history from openfier server using asmack?

I’m developing simple chat application, in which I have done chat functionality, means my app user can send and receive chat messages at both end.

But now I want to get chat history of same user, how can I do that? I have tried various things and also done lots of R & D but I don’t get required information.

I’m using asamck lib, and openfire server. I added monitoring service plugins on my server, but what is next step to get the history?