OpenScape
V3.2, Revision 044 20100322

com.siemens.symphonia.bcom.bcommon.external
Interface ComSession

All Known Subinterfaces:
ComSessionInternal
All Known Implementing Classes:
AbstractComSession, ComSessionImpl, ComSessionImpl

public interface ComSession

Root of any communication graph.

A ComSession serves the following purposes:

  1. It is the root of any communication in user and device views. I.e. each BComUser or DeviceEndpoint can have one or more ComSessions which in turn contain the communications. The methods BComUser.getComSessions() and DeviceEndpoint.getComSessions() allow access to the current set of ComSessions.
  2. An application can group multiple communications together in one ComSession. This allows to build logical units up to the needs of the application.
All users or devices which are in the same communication share also the ComSession where the communication belongs to. Attached data (see getAttachedData() and setAttachedData()) are therefore available to all parties. This results in that e.g. a user can retrieve the data attached by another user sharing the ComSession.

The creation of a ComSession can be done by either BComUser.createComSession() or DeviceEndpoint.createComSession(). This implicitely assigns the created ComSession to the appropriate user or device view.


Method Summary
 VoiceCommunication createVoiceCommunication()
          Creates a new VoiceCommunication within this session.
 java.io.Serializable getAttachedData(java.lang.String key)
          Retrieves attached data.
 java.util.Iterator getCommunications()
          Provides all communications grouped together.
 java.lang.String[] getKeysOfAttachedData()
          Get all keys used for attached data.
 boolean isPermanent()
          Gets the permanent setting.
 void release()
          Releases this ComSession.
 void removeAttachedData(java.lang.String key)
          Removes attached data.
 void setAttachedData(java.lang.String key, java.io.Serializable value)
          Stores attached data.
 void setPermanent()
          Sets this ComSession to be permanent.
 

Method Detail

getCommunications

java.util.Iterator getCommunications()
Provides all communications grouped together.

Grouping is done by means of the method createVoiceCommunication() as intended by the application. Communications not initiated by an application are always created in its own ComSession.

Returns:
Iterator to list of Communication objects.

createVoiceCommunication

VoiceCommunication createVoiceCommunication()
Creates a new VoiceCommunication within this session.

It is possible to create an arbitrary number of VoiceCommunication objects in one ComSession. But it is also allowed to create for each VoiceCommunication its own ComSession. Grouping can be freely used to build logical units.

Note:
This method invokes a synchronous service request which implicates:

Returns:
The created VoiceCommunication.

release

void release()
Releases this ComSession.

Each ComSession created by BComUser.createComSession() or DeviceEndpoint.createComSession() must be released when no more needed. Otherwise memory occupied will not be freed.

Only ComSessions without a communication must be released. I.e. all communications inside must be terminated before.

ComSessions created automatically (e.g. caused by an incoming communication) need not to be released.

Note:
This method invokes a synchronous service request which implicates:


getAttachedData

java.io.Serializable getAttachedData(java.lang.String key)
Retrieves attached data.

Gets the attached data object stored previous by setAttachedData().

Note:
This method invokes a synchronous service request which implicates:

Parameters:
key - which was used to store the data object.
Returns:
the attached data object or null if there are no attached data with the given key.

setAttachedData

void setAttachedData(java.lang.String key,
                     java.io.Serializable value)
Stores attached data.

Allows to store an application specific data object with this ComSession. The identification of the data object is done by a key selected by the application.

There is no check for uniqueness of the given key. If the key is already used the old data object is overwritten by the new one.

The size of the data object to be stored is checked against a limit and also the sum of all data objects stored with this ComSession is checked. It is not allowed to store more data than this limits. Huge objects should be stored in the database and only the database reference should be attached.
The current limit for both checks is 10KByte.

Note:
This method invokes a synchronous service request which implicates:

Parameters:
key - which is to be used for storing the data object.
value - object to be stored as attached data.

removeAttachedData

void removeAttachedData(java.lang.String key)
Removes attached data.

Searches for the attached data specified by the given key and removes both the data object and the key.
It is silently ignored if the given key doesn't exist.

Note:
This method invokes a synchronous service request which implicates:

Parameters:
key - of the data object to be removed.

getKeysOfAttachedData

java.lang.String[] getKeysOfAttachedData()
Get all keys used for attached data.

Retrieves all keys for which data are attached on this ComSession.

Note:
This method invokes a synchronous service request which implicates:

Returns:
Array with all keys of the attached data; length of the array maybe 0 if there are not attached data.

setPermanent

void setPermanent()
Sets this ComSession to be permanent.

When a user or device leaves a communication (e.g. by transferring the communication) the Communication is terminated in the appropriate view. So the user or device can't follow the communication anymore.
By setting a ComSession to be permanent all events are still sent for communications left. This allows to follow all communications and take further actions on this communication despite not beeing part of it.

Remarks:

Note:
This method invokes a synchronous service request which implicates:


isPermanent

boolean isPermanent()
Gets the permanent setting.

Determine whether this ComSession is set to be permanent.

Returns:
true if this ComSession is set to be permanent, false otherwise.

OpenScape
V3.2, Revision 044 20100322

Copyright (c) 2014 Unify, Germany
All rights reserved.

This software is the confidential and proprietary information of Unify, Germany