org.mobicents.slee.resource.parlay.session
Class ParlaySessionImpl

java.lang.Object
  extended by org.mobicents.slee.resource.parlay.session.ParlaySessionImpl
All Implemented Interfaces:
java.util.EventListener, FwSessionListener, ParlaySession

public class ParlaySessionImpl
extends java.lang.Object
implements ParlaySession, FwSessionListener

Manages all Parlay Session state. Will contain maps to each of the selected services and the related FwSession.


Field Summary
protected  FwSession fwSession
           
 
Constructor Summary
ParlaySessionImpl(FwSessionProperties fwProperties, ActivityManager activityManager)
           
 
Method Summary
 ServiceSession createServiceSession(java.lang.String serviceTypeName, ServiceAndToken serviceAndToken, org.mobicents.csapi.jr.slee.TpServiceIdentifier serviceIdentifier, FwSession fwSession, ActivityManager activityManager)
           
 void destroy()
          Destroys the Parlay Session.
 FwSession getFwSession()
           
 GccsListener getGccsListener()
           
 MpccsListener getMpccsListener()
           
 org.mobicents.csapi.jr.slee.TpServiceIdentifier getService(java.lang.String serviceTypeName, java.util.Properties serviceProperties)
          Returns an identifier for a service matching the specified name and service properties.
 ServiceSession getServiceSession(org.mobicents.csapi.jr.slee.TpServiceIdentifier serviceIdentifier)
          Gets the session for the specified service identifier.
 UiListener getUiListener()
           
 void init()
          Initialise Parlay Session.
 void setGccsListener(GccsListener gccsListener)
           
 void setMpccsListener(MpccsListener mpccsListener)
           
 void setUiListener(UiListener uiListener)
           
 void terminateAccess(org.mobicents.csapi.jr.slee.fw.TerminateAccessEvent event)
          Called due to a gateway initiated access termination.
 void terminateServiceAgreement(org.mobicents.csapi.jr.slee.fw.TerminateServiceAgreementEvent event)
          Called due to a gateway initiated service agreement termination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fwSession

protected transient FwSession fwSession
Constructor Detail

ParlaySessionImpl

public ParlaySessionImpl(FwSessionProperties fwProperties,
                         ActivityManager activityManager)
Method Detail

init

public void init()
          throws FwSessionException
Description copied from interface: ParlaySession
Initialise Parlay Session. Will authenticate the RA with the Parlay Gateway. A failure to authenticate will result in an exception being thrown and the session will be invalid.

Specified by:
init in interface ParlaySession
Throws:
FwSessionException

destroy

public void destroy()
Description copied from interface: ParlaySession
Destroys the Parlay Session. endAccess() will be called on the Parlay Gateway. Once this is called no further communication will be possible with the Gateway via this session.

Specified by:
destroy in interface ParlaySession

getService

public org.mobicents.csapi.jr.slee.TpServiceIdentifier getService(java.lang.String serviceTypeName,
                                                                  java.util.Properties serviceProperties)
                                                           throws FwSessionException,
                                                                  javax.slee.resource.ResourceException
Description copied from interface: ParlaySession
Returns an identifier for a service matching the specified name and service properties.

Specified by:
getService in interface ParlaySession
Parameters:
serviceTypeName - The Parlay service type name e.g. P_USER_INTERACTION.
serviceProperties - The Parlay service properties in (Name;Value) pairs. For parameters with a set of values use a comma separated list.
Returns:
an identifier for the service.
Throws:
javax.slee.resource.ResourceException
FwSessionException

getServiceSession

public ServiceSession getServiceSession(org.mobicents.csapi.jr.slee.TpServiceIdentifier serviceIdentifier)
Description copied from interface: ParlaySession
Gets the session for the specified service identifier.

Specified by:
getServiceSession in interface ParlaySession
Returns:

terminateAccess

public void terminateAccess(org.mobicents.csapi.jr.slee.fw.TerminateAccessEvent event)
Description copied from interface: FwSessionListener
Called due to a gateway initiated access termination.

Specified by:
terminateAccess in interface FwSessionListener

terminateServiceAgreement

public void terminateServiceAgreement(org.mobicents.csapi.jr.slee.fw.TerminateServiceAgreementEvent event)
Description copied from interface: FwSessionListener
Called due to a gateway initiated service agreement termination.

Specified by:
terminateServiceAgreement in interface FwSessionListener

getFwSession

public FwSession getFwSession()
Returns:
Returns the fwSession.

getMpccsListener

public MpccsListener getMpccsListener()
Returns:
Returns the mpccsListener.

setMpccsListener

public void setMpccsListener(MpccsListener mpccsListener)
Specified by:
setMpccsListener in interface ParlaySession
Parameters:
mpccsListener - The mpccsListener to set.

createServiceSession

public ServiceSession createServiceSession(java.lang.String serviceTypeName,
                                           ServiceAndToken serviceAndToken,
                                           org.mobicents.csapi.jr.slee.TpServiceIdentifier serviceIdentifier,
                                           FwSession fwSession,
                                           ActivityManager activityManager)
                                    throws javax.slee.resource.ResourceException
Parameters:
serviceAndToken -
serviceIdentifier -
fwSession -
activityManager -
Returns:
Throws:
javax.slee.resource.ResourceException

getGccsListener

public GccsListener getGccsListener()
Returns:
Returns the mpccsListener.

setGccsListener

public void setGccsListener(GccsListener gccsListener)
Specified by:
setGccsListener in interface ParlaySession
Parameters:
gccsListener - The gccsListener to set.

getUiListener

public UiListener getUiListener()
Returns:
Returns the uiListener

setUiListener

public void setUiListener(UiListener uiListener)
Specified by:
setUiListener in interface ParlaySession
Parameters:
uiListener - The uiListener to set.


Copyright © 2009. All Rights Reserved.