Main Page Class Hierarchy Compound List Compound Members SessionCreationAttributes Class Reference
Container for all attributes that may be required upon session creation. More...
Public Methods
SessionCreationAttributes () Default constructor. virtual ~SessionCreationAttributes () Destructor. void setSessionName (const char *name) throw (SoamException) Sets the name of the session. void setSessionType (const char *type) throw (SoamException) Sets the session type. void setSessionFlags (const SoamUInt32 flags) throw (SoamException) Sets the session flags. void setCommonData (Message *commonData) throw (SoamException) Sets the common data. void setSessionCallback (SessionCallback *callback) throw (SoamException) Sets the session callback. void setSessionTag (const char *tag) throw (SoamException) Sets the session tag. void setSessionPriority (const SoamInt32 priority) throw (SoamException) Sets the priority of the session. void setServiceName (const char *serviceName) throw (SoamException) Sets the service name to be associated with the session. void enableDataCompression (bool compressionEnable) throw (SoamException) Enables or disables data compression for a session. void setDataCompressionThreshold (const SoamInt32 threshold) throw (SoamException) Sets the threshold for triggering data compression. void setDataCompressionFlags (const SoamUInt32 dataCompressionFlag) throw (SoamException) Sets any flag associated with data compression. void enableDirectDataTransfer (bool directDataTransferEnable) throw (SoamException) Enables or disables the Direct Data Transfer feature for a session. void setDirectDataTransferFlags (SoamInt32 ddtFlags) throw (SoamException) Sets the Direct Data Transfer flags. Friends
class Connection Detailed Description
Container for all attributes that may be required upon session creation.
- See also:
- Connection::createSession(const SessionCreationAttributes& attributes)
Constructor & Destructor Documentation
SessionCreationAttributes ( )
Default constructor.
Constructs a SessionCreationAttributes object with default settings.
virtual ~SessionCreationAttributes ( ) [virtual]
Destructor.
Member Function Documentation
void setSessionName ( const char * name ) throw (SoamException)
Sets the name of the session.
The session name attribute tells Symphony what name to give your session, so that the session can be easily identified. Maximum 256 characters. Default session name is "".
- Parameters:
name [IN] - The session name.
- Exceptions:
SoamException
void setSessionType ( const char * type ) throw (SoamException)
Sets the session type.
The session type argument tells Symphony which type of session to create. In the application profile, you can define different types of sessions with different attributes. Symphony also defines a system default session type with the name "". For this argument, specify the name of the session type you would like to use. Default value is "".
- Parameters:
type [IN] - The session type.
- Exceptions:
SoamException
void setSessionFlags ( const SoamUInt32 flags ) throw (SoamException)
Sets the session flags.
The session flags are used to inform the API of any extended behavior to associate with the session. When not specified, the default flag will be SF_SYNC. This value can be a combination of Session::SessionFlags values. See samples for details.
- Parameters:
flags [IN] - The session flags.
- Exceptions:
SoamException
- See also:
- Session::SessionFlags
void setCommonData ( Message * commonData ) throw (SoamException)
Sets the common data.
This method allows you to provide common data to the created session. Common data is any data that is common to all of the tasks in your session. You can send common data rather than sending duplicate data to each task, and thus save on network overhead. Default value is null - no common data.
- Parameters:
commonData [IN] - The common data for the session.
- Exceptions:
SoamException
void setSessionCallback ( SessionCallback * callback ) throw (SoamException)
Sets the session callback.
This method allows you to specify a SessionCallback object, which is a handler that will allow you to process your session's task results asynchronously. The session callback should only be provided when you have set the appropriate session flags to indicate that you will be receiving task results asynchronously. Default value is null - no session callback.
- Parameters:
callback [IN] - The session callback.
- Exceptions:
SoamException
void setSessionTag ( const char * tag ) throw (SoamException)
Sets the session tag.
The session tag is just a string that will be associated with the created session. Maximum length 128 characters. Default value is "", which means that no session tag is associated with the session.
- Parameters:
tag [IN] - The session tag.
- Exceptions:
SoamException
void setSessionPriority ( const SoamInt32 priority ) throw (SoamException)
Sets the priority of the session.
Depending on the scheduling policy in effect for an application, a session's priority may impact the assignment of service instances to a session, whenever the Session Manager attempts to make scheduling decisions. The higher the priority the greater the likelihood that a service instance will be assigned to this session (if one is available).
Note: The session priority can be any number between 1 and 10,000 (inclusive).
- Parameters:
priority [IN] - The priority of the session.
- Exceptions:
SoamException
void setServiceName ( const char * serviceName ) throw (SoamException)
Sets the service name to be associated with the session.
This methods allows the developer to dynamically associate a service name with the session being created. You can define multiple Service sections in your application profile, where each service may be different. Setting the service name on your session means that this session will be serviced by the specified service section.
Note: The service name can only be one of the names defined in the application profile.
- Parameters:
serviceName [IN] - The service name.
- Exceptions:
SoamException
void enableDataCompression ( bool compressionEnable ) throw (SoamException)
Enables or disables data compression for a session.
Data compression will be triggered once the serialized data size is larger than the Data Compression Threshold. The default Data Compression Threshold is 1KB. Data compression can be enabled or disabled while creating the session and cannot be changed once the session has been created. When not explicitly specified, data compression will be disabled.
Note: Once enabled, all data compression attributes will be applied to common data, common data updates, task input and task output.
- Parameters:
compressionEnable [IN] - Enable or disable data compression.
- Exceptions:
SoamException
void setDataCompressionThreshold ( const SoamInt32 threshold ) throw (SoamException)
Sets the threshold for triggering data compression.
When data compression is enabled for a session, the Data Compression Threshold will be the amount of serialized data (in kilobytes) to allow before triggering compression.The default value for this threshold is 1 kilobyte.
Note: Sets this value has no effect if data compression is disabled.
- Parameters:
threshold [IN] - The data compression threshold.
- Exceptions:
SoamException
void setDataCompressionFlags ( const SoamUInt32 dataCompressionFlag ) throw (SoamException)
Sets any flag associated with data compression.
When data compression is enabled for a session, compression flags can be used to modify the behavior of the data compression feature.
The default value for this flag is Session::DataCompressionFlags.BestSpeed.
Note: Sets this value has no effect if data compression is disabled.
- Parameters:
dataCompressionFlag [IN] - Compression flags.
- Exceptions:
SoamException
- See also:
- Session::DataCompressionFlags
void enableDirectDataTransfer ( bool directDataTransferEnable ) throw (SoamException)
Enables or disables the Direct Data Transfer feature for a session.
Direct Data Transfer will provide a way to directly send the data from the client to the service transparently to the client application or vice versa. This attribute may be set during session creation operations. If this attribute is not set by the application it means Direct Data Transfer will not be enabled.
Note: Once enabled, all Direct Data Transfer attributes will be applied to common data, common data updates, task input and task output.
- Parameters:
directDataTransferEnable [IN] - Flag that specifies whether to enable the Direct Data Transfer feature.
- Exceptions:
SoamException
void setDirectDataTransferFlags ( SoamInt32 ddtFlags ) throw (SoamException)
Sets the Direct Data Transfer flags.
When Direct Data Transfer is enabled for a session, Direct Data Transfer flags can be used to modify the behavior of the Direct Data Transfer feature.
Note: Setting this value has no effect if Direct Data Transfer is disabled.
- See also:
- Session::DirectDataTransferFlags for details of the possible flags.
- Parameters:
ddtFlags [IN] - Direct Data Transfer Flags
- Exceptions:
SoamException
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.