|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMConversation
Represents a two party IM conversation. It extends a Communication. The application would use this communication type to send and receive messages.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.glassfish.cafe.api.Communication |
---|
Communication.State |
Method Summary | |
---|---|
MessageIndication |
createMessageIndication()
Creates a message indication object. |
MessageIndication |
createMessageIndication(MessageIndication.State state)
Creates a message indication object. |
TextMessage |
createTextMessage()
Creats an empty text message object. |
TextMessage |
createTextMessage(String msg)
Creates the text message with the supplied text. |
int |
getIdleTime()
Return the current value of the idle time. |
UserParticipant |
getParticipant()
Retrieve the participant which receives the messages from the initiator. |
void |
setIdleTime(int idleTime)
An IM conversation by default gets destroyed as soon as the message is received successfully or sent successfully. |
Methods inherited from interface org.glassfish.cafe.api.Communication |
---|
addAgent, addParticipant, addParticipant, addParticipant, addParticipant, end, getAgent, getAgents, getInitiator, getName, getParticipant, getParticipant, getState, removeAgent, removeParticipant, removeParticipant, replaceParticipant |
Method Detail |
---|
TextMessage createTextMessage()
TextMessage
TextMessage createTextMessage(String msg)
TextMessage tm = im.createTextMessage();
tm.setText(msg);
msg
- Text data of the message.
TextMessage
MessageIndication createMessageIndication()
MessageIndication
MessageIndication createMessageIndication(MessageIndication.State state)
state
- State of the MessageIndication.
MessageIndication
,
MessageIndication.State
void setIdleTime(int idleTime)
idleTime
- Idle time in seconds.int getIdleTime()
UserParticipant getParticipant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |