Visit Platform at http://www.platform.com

Main Page   Class Hierarchy   Compound List   Compound Members  

SessionContext Class Reference

The interface class of session context used by service instance. More...

List of all members.


Public Types

enum  SessionUpdateTypes

Public Methods

const char * getSessionId (void) const throw (SoamException)
 Gets the ID of a Session returned by SOAM.

void getCommonData (Message &commonData) const throw (SoamException)
 Gets the common data object of a Session passed in when the session was created.

void populateCommonData (Message &commonData) const throw (SoamException)
 Gets the common data object of a Session; passed in when the session was created.

void discardCommonData (void) throw (SoamException)
 Frees the middleware's local copy of the common data.

bool isUpdated (const SessionUpdateTypes updateType) throw (SoamException)
 Indicates whether the specified attribute was updated.


Friends

class ServiceContainer

Detailed Description

The interface class of session context used by service instance.

A session context will be associated with each session. It will host certain information that may be required during the servicing of a task from a session.

A session context made available only if common data has been provided for the Session. The service instance may choose to cache a reference to this object and call on it within its proper scope. It is first accessible in the ServiceContainer::onSessionEnter() method, and is considered invalid after the ServiceContainer::onSessionLeave() method returns.

NOTE: It is always best to access a pointer to this type of object through the appropriate smart pointer type instead of using a raw pointer.

See also:
SessionContextPtr , ServiceContainer::onSessionEnter , ServiceContainer::onSessionUpdate


Member Enumeration Documentation

enum SessionUpdateTypes
 

SessionContext::SessionUpdateTypes Enumeration that contains all of the possible session update types.

See also:
Session::update

Member Function Documentation

const char* getSessionId void    const throw (SoamException)
 

Gets the ID of a Session returned by SOAM.

Returns:
a Session ID.
Exceptions:
SoamException 

void getCommonData Message   commonData const throw (SoamException)
 

Gets the common data object of a Session passed in when the session was created.

Deprecated:
This method was deprecated in Symphony 3.1, use
void SessionContext::populateCommonData (Message& commonData) instead.
Parameters:
commonData  [OUT] - The Message object to populate with common data.
Exceptions:
SoamException 
See also:
Connection::createSession , Message

void populateCommonData Message   commonData const throw (SoamException)
 

Gets the common data object of a Session; passed in when the session was created.

Parameters:
commonData  [OUT] - The Message object to populate with common data.
Exceptions:
SoamException 
See also:
Connection::createSession , Message

void discardCommonData void    throw (SoamException)
 

Frees the middleware's local copy of the common data.

If the developer has sucessfully extracted the common data from the middleware and is concerned about the memory being consumed by the copy held in the middleware locally, this method can be used to free it.

Note : once the data is freed any subsequent requests to attempt to retrieve it will result in an exception.

Exceptions:
SoamException 

bool isUpdated const SessionUpdateTypes    updateType throw (SoamException)
 

Indicates whether the specified attribute was updated.

Intended to be used during an invocation of ServiceContainer::onSessionUpdate to determine whether the specified attribute was updated for this invocation.

If the attribute was updated, it can then be retrieved from the SessionContext.

Valid update types are:

  • COMMON_DATA
Parameters:
updateType  [IN] - The update attribute to check.
Returns:
True if the specified attribute was updated, false otherwise.
Exceptions:
SoamException 
See also:
SessionUpdateTypes , ServiceContainer::onSessionUpdate


     
Date Modified: 3 Nov 2008
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2008 Platform Computing Corporation. All rights reserved.