|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMConference
Represents a multi-party pager-mode instant messaging. It extends an Interaction. There are two ways to create this interaction object:
CommunicationSession.createIMConference(String)
CommunicationSession.createIMConference(String, IMConversation)
When a participant tries to send a text message to an IM conference, Container will receive MESSAGE request and will trigger an event to the CommunicationBean. The CommunicationBean can make use of this communication object to send message to all other the attendees , like this:
@CommunicationBean public class IMConferenceBean { @Context CommunicationSession session; @Context CommunicationContext context; @Context CommunicationService service; @CommunicationEvent(type = CommunicationEvent.Type.INITIALIZATION, communicationType = IMConversation.class) void handleInit() { IMConversation conv = (IMConversation) context.getCommunication(); TextMessage msg = (TextMessage)ctx.getMessage(); String confName = conv.getParticipant().getName() if (confName.equalsIgnoreCase("imconf@example.com")) { // Create a new IMConference or add into the IMConference. IMConference conf = session.createIMConference(confName, conv); // send message to other attendees. conf.createTextMessage(msg.getText()).send(conv.getInitiator()); } }
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.oracle.sft.api.Communication |
---|
Communication.State |
Method Summary | |
---|---|
CommonPresenceInstantMessage |
createCommonPresenceInstantMessage() Create a Common Presence and Instant Messaging message |
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. |
Collection<UserParticipant> |
getAllParticipants() Return all the participants in the conference. |
String |
getDescription() Return the description of the conference. |
int |
getIdleTime() Return the current value of the idle time. |
void |
setDescription(String description) Set the description of the conference. |
void |
setIdleTime(int idleTime) An IM conference by default gets destroyed as soon as the message is received successfully or sent successfully. |
Methods inherited from interface com.oracle.sft.api.Interaction |
---|
addParticipant, addParticipant, addParticipant, addParticipant, getParticipant, getParticipant, removeParticipant, removeParticipant, replaceParticipant, replaceParticipant |
Methods inherited from interface com.oracle.sft.api.Communication |
---|
addAgent, end, getAgent, getAgents, getInitiator, getName, getState, removeAgent |
Method Detail |
---|
void setDescription(String description)
description
- Description of the IMConferenceString getDescription()
Collection<UserParticipant> getAllParticipants()
UserParticipant
objects.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)
MessageIndication
CommonPresenceInstantMessage createCommonPresenceInstantMessage()
void setIdleTime(int idleTime)
idleTime
- Idle time in seconds.int getIdleTime()
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2012 Oracle Corporation. All Rights Reserved.