Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


com.oracle.sft.api
Interface IMConversation

All Superinterfaces:
Communication, Interaction

public interface IMConversation
extends Interaction

Represents a two party IM conversation. It extends a Interaction. The application would use this communication type to send and receive messages.

IMConversation is created by the SFT internally for the incoming MESSAGE request. Upon the creation of IMConversation, CommunicationEvent.Type.INITIALIZATION event will be invoked on the CommunicationBean. IMConversation also can be created by invoking the related API . There are two ways to create this communication object:

   CommunicationSession.createIMConversation(String initiator)
   CommunicationSession.createIMConversation(String initiator, String name)
 

If the CommunicationBean creates an IMConference with this conversation, then this conversation will be terminated, and the IMConference will be initiated. (Refer IMConference usage examples).

If the CommunicationBean either does not handle the event or does not create the IMConference, then the IMConversation between the two remote parties will be established.


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
 EndUserConfirmationMessage createEndUserConfirmationRequestMessage(EndUserConfirmationData request)
          Create End User Confirmation Request Message with supplied End User Confirmation data
 EndUserConfirmationMessage createEndUserConfirmationResponseMessage(EndUserConfirmationData response)
          Create End User Confirmation Response in Message with supplied End User Confirmation data
 MessageIndication createMessageIndication()
          Creates a message indication object.
 MessageIndication createMessageIndication(MessageIndication.State state)
          Creates a message indication object.
 TextMessage createTextMessage()
          Creates 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.
 Participant getOtherParty(Participant p)
          Get the other party of the specified participant in this IMConversation.
 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 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

createTextMessage

TextMessage createTextMessage()
Creates an empty text message object. Application would then fill it with text content and send to the participant.
Returns:
a TextMessage object.
See Also:
TextMessage

createTextMessage

TextMessage createTextMessage(String msg)
Creates the text message with the supplied text. This is equivalent to doing. TextMessage tm = im.createTextMessage(); tm.setText(msg);
Parameters:
msg - Text data of the message.
Returns:
a TextMessage object.
See Also:
TextMessage

createMessageIndication

MessageIndication createMessageIndication()
Creates a message indication object. The object will be created with default values specified in the MessageIndication class
Returns:
a MessageIndication object.
See Also:
MessageIndication

createMessageIndication

MessageIndication createMessageIndication(MessageIndication.State state)
Creates a message indication object. The object will be created with default values specified in the MessageIndication class
Parameters:
state - State of the MessageIndication.
Returns:
a MessageIndication object.
See Also:
MessageIndication, MessageIndication.State

setIdleTime

void setIdleTime(int idleTime)
An IM conversation by default gets destroyed as soon as the message is received successfully or sent successfully. However if the idletime is set to a value greater than zero, then the conversation will be alive until it is idle for the time specified. After the specified time period, the conversation will be removed. A value of zero means that the conversation will always be active. Default value is -1, which means that the conversation will be removed as soon as the SIP message gets committed.
Parameters:
idleTime - Idle time in seconds.

getIdleTime

int getIdleTime()
Return the current value of the idle time.
Returns:
Idle time in seconds.

getParticipant

UserParticipant getParticipant()
Retrieve the participant which receives the messages from the initiator.
Returns:
The participant who receives the messages from the initiator.

createEndUserConfirmationRequestMessage

EndUserConfirmationMessage createEndUserConfirmationRequestMessage(EndUserConfirmationData request)
Create End User Confirmation Request Message with supplied End User Confirmation data
Parameters:
request - EndUserConfirmationData
Returns:
EndUserConfirmationMessage object

createEndUserConfirmationResponseMessage

EndUserConfirmationMessage createEndUserConfirmationResponseMessage(EndUserConfirmationData response)
Create End User Confirmation Response in Message with supplied End User Confirmation data
Parameters:
response - EndUserConfirmationData
Returns:
EndUserConfirmationMessage object

createCommonPresenceInstantMessage

CommonPresenceInstantMessage createCommonPresenceInstantMessage()
Create a Common Presence and Instant Messaging message
Returns:
CommonPresenceInstantMessage objext

getOtherParty

Participant getOtherParty(Participant p)
Get the other party of the specified participant in this IMConversation.
Parameters:
p - The initiator or participant of current IMConversation.
Returns:
if p is initiator, then participant is returned; if p is participant, initiator is returned; otherwise, return null.

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


Copyright © 2012 Oracle Corporation. All Rights Reserved.