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

Main Page   Class Hierarchy   Compound List   Compound Members  

Connection Class Reference

Used by the client to maintain a physical connection between client and the SOA middleware for an application. More...

List of all members.


Public Methods

const char * getId (void) const throw (SoamException)
 Get the ID of this Connection. The Connection's ID will have a unique value.

SessioncreateSession (const char *sessionName=SOAM_NULL_PTR, const char *sessionType=SOAM_NULL_PTR, SoamULong sessionFlags=SF_SYNC, Message *commonData=SOAM_NULL_PTR, SessionCallback *callback=SOAM_NULL_PTR) throw (SoamException)
 Creates a Session on a connection.

SessioncreateSession (SessionCreationAttributes &attributes) throw (SoamException)
 Creates a Session on a connection.

SessionopenSession (const char *sessionID, SoamULong sessionFlags=SF_SYNC, SessionCallback *callback=SOAM_NULL_PTR) throw (SoamException)
 Opens an existing session.

SessionopenSession (const SessionOpenAttributes &attributes) throw (SoamException)
 Opens an existing session.

void close (void) throw (SoamException)
 Close the connection.


Friends

class SoamFactory

Detailed Description

Used by the client to maintain a physical connection between client and the SOA middleware for an application.

This interface can be thought of as representing the actual connection to an SSM through which it will communicate with the services of an application. The connection object could be created by using SoamFactory::connect, on which a session object could be created by using Connection::createSession to manage the workload.

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:
ConnectionPtr , SoamFactory , Session


Member Function Documentation

const char* getId void    const throw (SoamException)
 

Get the ID of this Connection. The Connection's ID will have a unique value.

This method will retrieve the ID associated with the connection.

Returns:
a Connection ID.
Exceptions:
SoamException 

Session* createSession const char *    sessionName = SOAM_NULL_PTR,
const char *    sessionType = SOAM_NULL_PTR,
SoamULong    sessionFlags = SF_SYNC,
Message   commonData = SOAM_NULL_PTR,
SessionCallback   callback = SOAM_NULL_PTR
throw (SoamException)
 

Creates a Session on a connection.

Deprecated:
This method was deprecated in Symphony 3.1, use the Session* Connection::createSession(const SessionCreationAttributes& attributes) call instead.
Creates a session on a connection with the given name, type, flags common data object and callback object. All the parameters are optional.
Parameters:
sessionName  [IN] - The session name, default is empty. Maximum length is 1024.
sessionType  [IN] - This 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. If you do not specify a value, the system default will be used. An exception will be thrown if a session type is specified that is not defined.
sessionFlags  [IN] - The session flag 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.
commonData  [IN] - The common data object used by a session.
callback  [IN] - The call back object used by a session.
Note:
For "Recoverable Sessions" (as specified by the "recoverable" flag being given a value of "true" in the Application Profile), all submissions will wait for a special confirmation from the middleware that the input has been stored in a manner that it can be recovered. This means that the submissions time of input to all "Recoverable Sessions" "may" be longer than those of "Non-Recoverable Sessions".
Returns:
a pointer to a Session.
Exceptions:
SoamException 
See also:
SoamFactory:connect , Message , SessionCallback , Session::SessionFlags

Session* createSession SessionCreationAttributes   attributes throw (SoamException)
 

Creates a Session on a connection.

Creates a session on a connection with the given attributes.

Parameters:
attributes  [IN] - The attributes to apply to the session upon creation.
Note:
For "Recoverable Sessions" (as specified by the "recoverable" flag being given a value of "true" in the Application Profile), all submissions will wait for a special confirmation from the middleware that the input has been stored in a manner that it can be recovered. This means that the submissions time of input to all "Recoverable Sessions" "may" be longer than those of "Non-Recoverable Sessions".
Returns:
a pointer to a Session.
Exceptions:
SoamException 
See also:
SoamFactory:connect , SessionCreationAttributes

Session* openSession const char *    sessionID,
SoamULong    sessionFlags = SF_SYNC,
SessionCallback   callback = SOAM_NULL_PTR
throw (SoamException)
 

Opens an existing session.

Deprecated:
This method was deprecated in Symphony 3.1, use the Session* Connection::openSession(const SessionOpenAttributes& attributes) call instead.
Opens an existing session and associates it with this connection.
Parameters:
sessionID  [IN] - The session ID.
sessionFlags  [IN] - The session flag 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.
callback  [IN] - The call back object used by a session.
Returns:
a pointer to a Session.
Note:
Since a session can only be associated with one connection at a time, if the session being opened is already associated with a different connection, the open request will succeed and the session will now be associated with the new connection. The client which had the session opened prior to this new open request will be disconnected from the session and an exception will be returned to that client indicating the transfer of the association.
Exceptions:
SoamException 
See also:
SoamFactory:connect , Message , SessionCallback , Session::SessionFlags

Session* openSession const SessionOpenAttributes   attributes throw (SoamException)
 

Opens an existing session.

Opens an existing session with the given attributes, and associates it with this connection.

Parameters:
attributes  [IN] - The attributes to apply to the session upon opening.
Returns:
a pointer to a Session.
Note:
Since a session can only be associated with one connection at a time, if the session being opened is already associated with a different connection, the open request will succeed and the session will now be associated with the new connection. The client which had the session opened prior to this new open request will be disconnected from the session and an exception will be returned to that client indicating the transfer of the association.
Exceptions:
SoamException 
See also:
SoamFactory:connect , SessionOpenAttributes

void close void    throw (SoamException)
 

Close the connection.

Closing the connection will result in the the logical connection between the client and the middleware to become broken. Once a connection is closed no further operations can be performed on the connection and all open sessions will be aborted by the middleware.

** NOTE : Never call close(...) during the execution of a callback method. This will result in a deadlock.

Exceptions:
SoamException 


     
Date Modified: 11 Nov 2009
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

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