Table of Contents

OIL2 Class Standard.HTTPcreateApplicationSession


class Standard . HTTPcreateApplicationSession {
        string  applicationClass;
        string  cookieName;
        string  cookieRoot;
        any     lastSessionID;
        string  pageName;
        oid     serviceOID;
        oid     urlDirectory;
inherits from Object;

DESCRIPTION

The HTTPcreateApplicationSession class is intended to be inherited by applications that integrate with the FARGOS/VISTA HTTPdaemon. It implements a facility for launching HTTP-based applications that generate dynamic content that is associated with single user's current activity.

The primary function of HTTPcreateApplicationSession is to launch an HTTP-based application that will be associated with a specific user. The trigger will be registered as a logical entity within the web server's naming tree. When accessed via an HTTP GET request, the HTTPcreateApplicationSession object will dynamically allocate a unique section of the web site's naming tree and create a new instance of the desired HTTP-based application. All of the user-specific dynamically-generated content should be registered under the portion of the web site's naming tree.

If a user's browser supports cookies, the provided cookie data will be used to reassociate a user with an already active session rather than create a brand new one. Some applications make use of only the makeSessionID method of this class. By always using makeSessionID as the standard mechanism for dynamically allocating a portion of a web site's naming tree, application developers can avoid any potential name space collisions.

METHODS


Standard.HTTPcreateApplicationSession:create

HTTPcreateApplicationSession:create()

Method Description

See initialize.


Standard.HTTPcreateApplicationSession:initialize

HTTPcreateApplicationSession:initialize(any serverName, string page, string className, optional string cookieKey, optional string cookiePath)

Method Description

The initialize method takes the following arguments:

serverName
the name of the URLdirectory to which the service should be attached.

If serverName is specified as "-", the system information attribute "hostName" is retrieved and used as the value of serverName. It can also be provided as the object Id of the desired server.

page
the logical page name where the service should appear in the document tree exported by the HTTPdaemon.
className
the class of new session objects.

Return Value

A return value of 0 indicates success. If the desired URLdirectory object cannot be located, -1 is returned to indicate the service could not be initialized.


Standard.HTTPcreateApplicationSession:getRequest

HTTPcreateApplicationSession:getRequest(array requestData, assoc options, string replyMethod, oid replyDest)

Method Description

The getRequest method handles HTTP GET requests. Such references to the object are treated as requests to shift the user's browser to a new browsing session generated by the application associated with the HTTPcreateApplicationSession object.

If the user's browser supports cookies, the sessionID of the user's last session is retrieved. If the indicated session is still active, then the browser is connected to that pre-existing session. If cookies are not supported or the session indicated by the cookie data no longer exists, then a brand-new session object is created to handle the user's future interactions.