public class IMMessageHandlerMocImpl extends java.lang.Object implements IMMessageHandler
Constructor and Description |
---|
IMMessageHandlerMocImpl(IMSessionMocImpl session,
IMUser imPartner) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(IMMessageListener messageListener) |
void |
closeConversation()
This method allows the user to close a chat conversation
|
IMUser |
getIMPartner() |
java.util.Set |
getListeners() |
boolean |
isOpened()
Returns true only if the conversation is still opened
|
void |
removeAllListeners() |
void |
removeListener(IMMessageListener messageListener) |
java.lang.String |
sendMessage(java.lang.String message)
Method that will be responsable for send menssage to user
|
void |
setOpened(boolean opened)
method to set if messaheandle is active
|
public IMMessageHandlerMocImpl(IMSessionMocImpl session, IMUser imPartner)
public IMUser getIMPartner()
public void addListener(IMMessageListener messageListener) throws IMException
addListener
in interface IMMessageHandler
IMException
public void closeConversation() throws IMException
IMMessageHandler
closeConversation
in interface IMMessageHandler
IMException
- if the conversation was not openedpublic boolean isOpened()
IMMessageHandler
isOpened
in interface IMMessageHandler
public void removeAllListeners()
removeAllListeners
in interface IMMessageHandler
public void removeListener(IMMessageListener messageListener)
removeListener
in interface IMMessageHandler
public java.util.Set getListeners()
public java.lang.String sendMessage(java.lang.String message) throws IMException
sendMessage
in interface IMMessageHandler
IMException
- if something wrong happens during the message sendingIMSession.createMessageHandler(IMUser)
public void setOpened(boolean opened)
opened
- boolean