Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


com.oracle.sft.api
Interface CommunicationSession


public interface CommunicationSession

Instance of a CommunicationSession object. Application can create Communication related objects from a CommunicationSession. When an event (eg: CommunicationEvent or ParticipantEvent) gets executed later for a Communication created from this CommunicationSession, the same CommunicationSession object will be injected into the CommunicationBean.

The form of the input parameter name in this interface's methods is: "sip:user@host" or "user@host", where user is either a user name or telephone number, host is domain name or IP address.

If the ServiceAttributes "domainName" attribute is specified, the name can be in the form of "sip:user" or "user".

See Also:
Message, Communication, Participant

Field Summary
static String NAME
          Name of the HTTP session attribute to retrieve an instance of CommunicationSession.

 

Method Summary
<C extends Communication>
C
createCommunication(Class<C> type, String name, Communication other, Object... arg)
          A generic method to create any type of communication from another communication.
<C extends Communication>
C
createCommunication(Class<C> type, String name, Participant initiator, Object... arg)
          A generic method to create any type of communication.
 Conference createConference()
          Create a conference without a specified name.
 Conference createConference(Focus focus)
          Create a conference with specified focus implementation.
 Conference createConference(String name)
          Create a conference with a specified name.
 Conference createConference(String name, Conversation c)
          Create a conference from the Conversation.
 Conference createConference(String name, Conversation c, Focus focus)
          Create a conference from the Conversation with specified Focus implementation.
 Conference createConference(String name, Focus focus)
          Create a conference with a specified name and focus implementation.
 Conversation createConversation(Participant initiator)
          Create a Conversation between the initiator and another party.
 Conversation createConversation(Participant initiator, String name)
          Create a Conversation between the initiator and another party.
 Conversation createConversation(String initiator)
          Create a Conversation between the initiator and another party.
 Conversation createConversation(String initiator, String name)
          Create a Conversation between the initiator and another party.
 IMConference createIMConference()
          Create an IMConference.
 IMConference createIMConference(String name)
          Create an IMConference with a specified name.
 IMConference createIMConference(String name, IMConversation c)
          Create an IMConference from the IMConversation.
 IMConversation createIMConversation(String initiator)
          Create an IMConversation between the initiator and another party.
 IMConversation createIMConversation(String initiator, String name)
          Create an IMConversation between the initiator and another party.
 MSRPConference createMSRPConference()
          Create a MSRPConference without a specified name.
 MSRPConference createMSRPConference(String name)
          Create a MSRPConference with a specified name.
 MSRPConference createMSRPConference(String name, MSRPConversation c)
          Create a MSRPConference from the MSRPConversation.
 MSRPConversation createMSRPConversation(String initiator)
          Create an MSRPConversation between the initiator and another party.
 MSRPConversation createMSRPConversation(String initiator, String name)
          Create an MSRPConversation between the initiator and another party.
<P extends Participant>
P
createParticipant(Class<P> type, String name)
          Create a participant, that can be added to the Communication.
<P extends Participant>
P
createParticipant(Class<P> type, String name, javax.media.mscontrol.join.Joinable j)
          Create a participant that can be added to the communication with a specific Joinable.
 QueryInteraction createQueryInteraction(String initiator)
          Create an QueryInteraction between the initiator and another party.
 QueryInteraction createQueryInteraction(String initiator, String name)
          Create an QueryInteraction between the initiator and another party.
 Map<?,?> getAllAttributes()
          Retrieve all attributes set in this session.
 Object getAttribute(String name)
          Retrieve the attribute from the session.
 Object removeAttribute(String name)
          Remove the attribute from the session.
 void setAttribute(String name, Object value)
          Set an attribute in the session.

 

Field Detail

NAME

static final String NAME
Name of the HTTP session attribute to retrieve an instance of CommunicationSession.
See Also:
Constant Field Values

Method Detail

setAttribute

void setAttribute(String name,
                  Object value)
Set an attribute in the session. The attribute value should be a Serializable Object.
Parameters:
name - Name of the attribute.
value - Value of the attribute.

getAttribute

Object getAttribute(String name)
Retrieve the attribute from the session.
Parameters:
name - of the attribute.
Returns:
Value of the attribute set earlier.

getAllAttributes

Map<?,?> getAllAttributes()
Retrieve all attributes set in this session.
Returns:
a Map of all attributes set so far.

removeAttribute

Object removeAttribute(String name)
Remove the attribute from the session.
Parameters:
name - Name of the attribute
Returns:
The value of the attribute removed. Returns null, if the attribute doesn't exist.

createConference

Conference createConference()
Create a conference without a specified name. This method is equivalent to executing createConference(null)
Returns:
An instance of Conference.
See Also:
Conference

createConference

Conference createConference(Focus focus)
Create a conference with specified focus implementation. This method is equivalent to executing createConference(null, focus) the conference name will use the name of focus.
Returns:
An instance of Conference.
See Also:
Conference

createConference

Conference createConference(String name)
Create a conference with a specified name. If the name is set to NULL, SFT will create a name for the conference. This is usually in the form of "Conference.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the conference.
Returns:
An instance of Conference.
See Also:
Conference

createConference

Conference createConference(String name,
                            Focus focus)
Create a conference with a specified name and focus implementation.

The SFT Conference focus has a default JSR 309 MediaMixer implementation, this method would enable creation of a conference with an existing JSR 309 mixer. So, application will be able to use JSR 309 APIs to create a Mixer and then wrap that Mixer in a Focus implementation to create the conference.

     MediaMixer mixer = ...
     CommunicationSession sess = ...
     Focus focus = sess.createPariticpant(Focus.class, mixer);
     Conference conference = sess.createConference(name, focus);
 
if parameter name is null, the conference name will use the focus name.
Parameters:
name - Name of the conference.
focus - a instance of focus implementation.
Returns:
An instance of Conference.
See Also:
Conference

createConference

Conference createConference(String name,
                            Conversation c)
Create a conference from the Conversation. If the recipient of the conversation and the name are the same, then the sender will be added to the conference.

If the recipient of the Conversation is different from the name, then a new conference will be created with the specified name and both the parties mentioned will be added to the conference.

This method is equivalent to executing createConference(name, c, null)

Parameters:
name - Name of the conference.
c - Conversation object
Returns:
An instance of Conference.
See Also:
Conference

createConference

Conference createConference(String name,
                            Conversation c,
                            Focus focus)
Create a conference from the Conversation with specified Focus implementation. If the parameter name is set to NULL, the conference name will use the Focus name.
Parameters:
name - Name of the conference.
c - Conversation object
Returns:
An instance of Conference.
See Also:
Conference

createConversation

Conversation createConversation(String initiator,
                                String name)
Create a Conversation between the initiator and another party. The specified name is used as the name of this communication. If the name is set to NULL, SFT will create a name for the communication. This is usually in the form of "Conversation.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the Conversation.
initiator - Initiator of the Conversation.
Returns:
An instance of Conversation.
See Also:
Conversation

createConversation

Conversation createConversation(String initiator)
Create a Conversation between the initiator and another party. This method is equivalent to executing createCall(initiator, null).
Parameters:
initiator - Initiator of the Conversation.
Returns:
An instance of Conversation.
See Also:
Conversation

createConversation

Conversation createConversation(Participant initiator,
                                String name)
Create a Conversation between the initiator and another party. The specified name is used as the name of this communication. If the name is set to NULL, SFT will create a name for the communication. This is usually in the form of "Conversation.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the Conversation.
initiator - Initiator of the Conversation.
Returns:
An instance of Conversation.
See Also:
Conversation

createConversation

Conversation createConversation(Participant initiator)
Create a Conversation between the initiator and another party. This method is equivalent to executing createCall(initiator, null).
Parameters:
initiator - Initiator of the Conversation.
Returns:
An instance of Conversation.
See Also:
Conversation

createIMConversation

IMConversation createIMConversation(String initiator,
                                    String name)
Create an IMConversation between the initiator and another party. The specified name is used as the name of this communication. If the name is set to NULL, SFT will create a name for the communication. This is usually in the form of "IMConversation.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the IMConversation.
initiator - Initiator of the IMConversation.
Returns:
An instance of IMConversation.
See Also:
IMConversation

createIMConversation

IMConversation createIMConversation(String initiator)
Create an IMConversation between the initiator and another party. This method is equivalent to executing createCall(initiator, null).
Parameters:
initiator - Initiator of the IMConversation.
Returns:
An instance of IMConversation.
See Also:
IMConversation

createIMConference

IMConference createIMConference()
Create an IMConference. This method is equivalent to executing createIMConference(null)
Returns:
An instance of IMConference.
See Also:
IMConference

createIMConference

IMConference createIMConference(String name)
Create an IMConference with a specified name. If the name is set to NULL, SFT will create a name for the IMConference. This is usually in the form of "IMConference.UUID" ,where UUID is a globally unique identifier.
Parameters:
name - Name of the IMConference.
Returns:
An instance of IMConference.
See Also:
IMConference

createIMConference

IMConference createIMConference(String name,
                                IMConversation c)
Create an IMConference from the IMConversation. If the recipient of the IMConversation and the name are the same, then a the sender will be added to the IMConference. If the recipient of the IMConversation is different from the name, then a new IMConference will be created with the specified name and both the parties mentioned will be added to the IMConference.
Parameters:
name - Name of the IMConference.
c - IMConversation object
Returns:
An instance of IMConference.
See Also:
IMConference

createCommunication

<C extends Communication> C createCommunication(Class<C> type,
                                                String name,
                                                Participant initiator,
                                                Object... arg)
A generic method to create any type of communication. For example, for creating an IMConversation, this method might be invoked as follows.
      CommunicationSession session = ....
      UserParticipant initiator =
      session.createParticipant(UserParticipant.class, "alice@example.com");
      IMConversation imc = session.createCommunication(IMConversation.class, "alice-chat", initiator);
 
This also enables extending SFT with new types of Communications.
Type Parameters:
C - Generic type name of the communication
Parameters:
type - Class of the Communication to be created.
name - Name of the Communication.
initiator - Initiator of the Communication.
arg - Any additional argument, a third party might require.
Returns:
Instance of the Communication object.

createCommunication

<C extends Communication> C createCommunication(Class<C> type,
                                                String name,
                                                Communication other,
                                                Object... arg)
A generic method to create any type of communication from another communication. For example, for creating an Conference from a Conversation, this method might be invoked as follows.
      CommunicationSession session = ....
      Conversation conv = ...//
      Conference conf = session.createCommunication(Conference.class, "conference@example.com", conv);
 
This also enables extending SFT with new types of Communications.
Type Parameters:
C - Generic type name of the communication
Parameters:
type - Class of the Communication to be created.
name - Name of the Communication.
other - The input communication.
arg - Any additional argument, a third party might require.
Returns:
Instance of the Communication object.

createMSRPConference

MSRPConference createMSRPConference()
Create a MSRPConference without a specified name. This method is equivalent to executing createMSRPConference(null)
Returns:
An instance of MSRPConference.
See Also:
MSRPConference

createMSRPConference

MSRPConference createMSRPConference(String name)
Create a MSRPConference with a specified name. If the name is set to NULL, SFT will create a name for the MSRPConference. This is usually in the form of "MSRPConference.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the MSRPConference.
Returns:
An instance of MSRPConference.
See Also:
MSRPConference

createMSRPConference

MSRPConference createMSRPConference(String name,
                                    MSRPConversation c)
Create a MSRPConference from the MSRPConversation. If the recipient of the MSRPConversation and the name are the same, then the sender will be added to the MSRPConference. If the recipient of the MSRPConversation is different from the name, then a new MSRPConference will be created with the specified name and both the parties mentioned will be added to the MSRPConference. This method is equivalent to executing createMSRPConference(name, c, null)
Parameters:
name - Name of the MSRPConference.
c - MSRPConversation object
Returns:
An instance of MSRPConference.
See Also:
MSRPConference

createParticipant

<P extends Participant> P createParticipant(Class<P> type,
                                            String name)
Create a participant, that can be added to the Communication.
Type Parameters:
P - Any Participant type which is a child of a Participant.
Parameters:
type - Any Class that is a child of Participant.
name - Name of the participant
Returns:
An instance of the Participant object.

createParticipant

<P extends Participant> P createParticipant(Class<P> type,
                                            String name,
                                            javax.media.mscontrol.join.Joinable j)
Create a participant that can be added to the communication with a specific Joinable. The Joinable passed in can be retrieved using getJoinable method. If it is null, then a new JSR 309 Joinable will be created by SFT.
Type Parameters:
P - Any Participant type which is a child of a Participant.
Parameters:
type - Any Class that is a child of Participant.
name - Name of the participant
j - An instance of Joinable object.
Returns:
An instance of the Participant object.

createQueryInteraction

QueryInteraction createQueryInteraction(String initiator,
                                        String name)
Create an QueryInteraction between the initiator and another party. The sepcified name is used as the name of this communication. If the name is set to NULL, SFT will create a name for the communication. This is usually in the form of "QueryInteraction.UUID". ,where UUID is a globally unique identifier.
Parameters:
name - Name of the QueryInteraction.
initiator - Initiator of the QueryInteraction.
Returns:
An instance of QueryInteraction.
See Also:
QueryInteraction

createQueryInteraction

QueryInteraction createQueryInteraction(String initiator)
Create an QueryInteraction between the initiator and another party. This method is equivalent to executing
Parameters:
initiator - Initiator of the QueryInteraction.
Returns:
An instance of QueryInteraction.
See Also:
QueryInteraction

createMSRPConversation

MSRPConversation createMSRPConversation(String initiator)
Create an MSRPConversation between the initiator and another party. T
Parameters:
initiator - Initiator of the MSRPConversation.
Returns:
An instance of MSRPConversation.
See Also:
MSRPConversation

createMSRPConversation

MSRPConversation createMSRPConversation(String initiator,
                                        String name)
Create an MSRPConversation between the initiator and another party. The specified name is used as the name of this communication. If the name is set to NULL, SFT will create a name for the communication. This is usually in the form of "MSRPConversation.UUID", where UUID is a globally unique identifier.
Parameters:
name - Name of the MSRPConversation.
initiator - Initiator of the MSRPConversation.
Returns:
An instance of MSRPConversation.
See Also:
MSRPConversation

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


Copyright © 2012 Oracle Corporation. All Rights Reserved.