HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
rwsf::HttpSessionIdGenerator Class Referenceabstract

Abstract base class for implementing HTTP session ID generator. More...

#include <rwsf/servlet/http/HttpSessionIdGenerator.h>

Public Member Functions

virtual ~HttpSessionIdGenerator ()
virtual std::string generateSessionId ()=0

(Note that these are not member symbols.)

#define RWSF_DEFINE_HTTP_SESSION_ID_GENERATOR(NAME)

Detailed Description

rwsf::HttpSessionIdGenerator serves as a base class for implementing a unique string generator used by the servlet container to identify a session. To create a generator, derive from this class and override the generateSessionId() function.

To register a generator, see RWSF_DEFINE_HTTP_SESSION_ID_GENERATOR documentation.

Constructor & Destructor Documentation

◆ ~HttpSessionIdGenerator()

virtual rwsf::HttpSessionIdGenerator::~HttpSessionIdGenerator ( )
inlinevirtual

Destuctor.

Member Function Documentation

◆ generateSessionId()

virtual std::string rwsf::HttpSessionIdGenerator::generateSessionId ( )
pure virtual

Returns a unique string.

◆ RWSF_DEFINE_HTTP_SESSION_ID_GENERATOR

#define RWSF_DEFINE_HTTP_SESSION_ID_GENERATOR ( NAME)
related

Defines a function that returns an instance of NAME. The Agent uses the function to construct an instance of HttpSessionIdGenerator. For example, to register MyGenerator:

#define RWSF_DEFINE_HTTP_SESSION_ID_GENERATOR(NAME)
Definition HttpSessionIdGenerator.h:74

and then add the property "http-session-id-generator" with the value of "library.createMyGenerator" to the handler chain for the servlet type in the main configuration file (usually <installdir>/conf/rwagent.xml).

<rwsf:handler name="servlet"
class="rwsf_servlet<ver>.createServletMessageInfoHandlerImp"
handlerChain="request">
<rwsf:property name="rwsf:httpSessionIdGenerator"
value="library.createMyGenerator"/>
</rwsf:handler>

Copyright © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.