Integrate the spark client

I have a java web application and how to integrate the spark client

for example:

There has a document should be approve by userA , But UserA is not online currently. And spark client will remind him to login the web app and view the documnet .If he do not deal with the document the spark client could remind him hourly .

this is my story,now how can i implement ?

as a word how to call the api to deliver the message in my app?

give me some demo code

thanks

use Smack