Method processMessage() in class ChatMessageListener

When user log in ,xmpp server will send offline message to the user

how can i get the offline message , here is my codes

ChatManager chatmanager = ChatManager.getInstanceFor(connection);

Chat newChat = chatmanager.createChat(“test@macmini”, new ChatMessageListener() {


public void processMessage(Chat chat, Message message) {

Set bodies = message.getBodies();

if(bodies != null && !bodies.isEmpty()){

for(Body body:bodies){


System.out.println("message is "+body.getMessage());





i can not debug in ChatMessageListener, i can not get the return message why?