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

Platform Symphony 5.0 Java API Reference

com.platform.symphony.soam
Interface SessionContext


public interface SessionContext

A container for the information associated with a particular Session. Such information may be required during the servicing of a task from a Session.

See Also:
ServiceContainer.onSessionEnter(com.platform.symphony.soam.SessionContext)

Method Summary
 void discardCommonData()
          Frees the middleware's local copy of the common data.
 java.lang.Object getCommonData()
          Retrieves the Serializable that was passed in when the Session was created.
 java.lang.String getSessionId()
          Returns the identifier for the associated Session, as provided by Symphony.
 boolean isUpdated(int updateType)
          Indicates whether the specified attribute was updated.
 void populateCommonData(Message commonData)
          Populates commonData with the data contained in the Message that was passed in when the Session was created.
 

Method Detail

getSessionId

java.lang.String getSessionId()
                              throws SoamException
Returns the identifier for the associated Session, as provided by Symphony.

Returns:
The identifier for the associated Session
Throws:
SoamException

populateCommonData

void populateCommonData(Message commonData)
                        throws SoamException
Populates commonData with the data contained in the Message that was passed in when the Session was created.

IMPORTANT NOTE:
If you sent your common data as a com.platform.symphony.soam.Message using Symphony Serialization, you must use this method to retrieve it.
If you sent your common data as a java.io.Serializable using Native Serialization, use the getCommonData method instead.

Parameters:
commonData - The message to populate.
Throws:
SoamException
See Also:
Connection.createSession(SessionCreationAttributes), SessionCreationAttributes.setCommonData(Message)

getCommonData

java.lang.Object getCommonData()
                               throws SoamException
Retrieves the Serializable that was passed in when the Session was created.

IMPORTANT NOTE:
If you sent your common data as a java.io.Serializable using Native Serialization, you must use this method to retrieve it.
If you sent your common data as a com.platform.symphony.soam.Message using Symphony Serialization, use the populateCommonData method instead.

Returns:
The common data object.
Throws:
SoamException
See Also:
Connection.createSession(SessionCreationAttributes), SessionCreationAttributes.setCommonData(Serializable)

discardCommonData

void discardCommonData()
                       throws 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.

Throws:
SoamException

isUpdated

boolean isUpdated(int updateType)
                  throws 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:

Parameters:
updateType - The update attribute.
Returns:
True if the specified attribute was updated, false otherwise.
Throws:
SoamException
See Also:
ServiceContainer.onSessionUpdate(com.platform.symphony.soam.SessionContext)

Version 5.0
Date Modified: -DREL_DATE=Nov 11 2009
Platform Computing. Accelerating Intelligence(TM).
Copyright (C) 2001-2009 Platform Computing Corporation. All rights reserved.