listeners.remove(username+controller.hashCode());
}
public Chat createChat(final String username, String chatPartnerJid, final Controller controller) {
ChatManager chatmanager = getInstantMessagingClient(username).getConnection().getChatManager();
Chat chat = chatmanager.createChat(chatPartnerJid, new MessageListener() {
public void processMessage(Chat chat, Message message) {
message.setProperty("receiveTime", new Long(new Date().getTime()));
GenericEventListener listener = listeners.get(username+controller.hashCode());
listener.event(new InstantMessagingEvent(message, "chatmessage"));