Vault  4.1
Public Member Functions | Protected Member Functions | Protected Attributes
VClientSessionFactory Class Reference

Implement a subclass of VClientSessionFactory (specifically, the createSession() method) to create a socket listener that will create the desired type of VClientSession whenever an incoming connection is accepted on that socket. More...

#include <vclientsession.h>

List of all members.

Public Member Functions

 VClientSessionFactory (VManagementInterface *manager, VServer *server)
 Initializes the factory.
virtual VClientSessionPtr createSession (VSocket *socket, VListenerThread *ownerThread)=0
 This is the method you must implement to instantiate the concrete type of VClientSession.
void addSessionToServer (VClientSessionPtr session)
 Adds the specified session to the server; the server keeps track of its sessions for purposes of broadcasting, clean shutdown, etc.
void setManager (VManagementInterface *manager)
 Sets the management interface to receive notifications.

Protected Member Functions

 VClientSessionFactory (const VClientSessionFactory &)
VClientSessionFactoryoperator= (const VClientSessionFactory &)

Protected Attributes

VManagementInterfacemManager
 The object that will be notified of session events.
VServermServer
 The server that will be notified of session creation.

Detailed Description

Implement a subclass of VClientSessionFactory (specifically, the createSession() method) to create a socket listener that will create the desired type of VClientSession whenever an incoming connection is accepted on that socket.

This class is a parameter to the VListenerThread constructor.

Definition at line 210 of file vclientsession.h.


Constructor & Destructor Documentation

VClientSessionFactory::VClientSessionFactory ( VManagementInterface manager,
VServer server 
) [inline]

Initializes the factory.

Parameters:
managerthe manager to be supplied to sessions that are created
serverthe server to be supplied to sessions that are created

Definition at line 218 of file vclientsession.h.


Member Function Documentation

virtual VClientSessionPtr VClientSessionFactory::createSession ( VSocket socket,
VListenerThread ownerThread 
) [pure virtual]

This is the method you must implement to instantiate the concrete type of VClientSession.

Parameters:
socketthe socket on which the client has connected
ownerThreadthe listener thread that accepted the connection
void VClientSessionFactory::addSessionToServer ( VClientSessionPtr  session)

Adds the specified session to the server; the server keeps track of its sessions for purposes of broadcasting, clean shutdown, etc.

Parameters:
sessionthe session that has been created

Definition at line 231 of file vclientsession.cpp.

References VServer::addClientSession(), mServer, and NULL.

void VClientSessionFactory::setManager ( VManagementInterface manager) [inline]

Sets the management interface to receive notifications.

May be NULL if no notifications are to be given. This manager may be passed to the sessions created and their threads.

Parameters:
managerthe manager to notify, or NULL

Definition at line 242 of file vclientsession.h.

References mManager.


The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.