Vault  4.1
Public Member Functions | Protected Attributes
VSocketThreadFactory Class Reference

VSocketThreadFactory is an abstract base class that you must override to create the kind of VSocketThread subclass you want. More...

#include <vsocketthreadfactory.h>

List of all members.

Public Member Functions

 VSocketThreadFactory (VManagementInterface *manager)
 Constructs the factory with the optional management interface that will be supplied to each socket thread.
virtual ~VSocketThreadFactory ()
 Destructor, declared for completeness.
void setManager (VManagementInterface *manager)
 Sets the management interface to receive notifications.
virtual VSocketThreadcreateThread (VSocket *socket, VListenerThread *ownerThread)=0
 Creates a VSocketThread object to communicate on the specified socket.

Protected Attributes

VManagementInterfacemManager
 The management interface supplied to each thread.

Detailed Description

VSocketThreadFactory is an abstract base class that you must override to create the kind of VSocketThread subclass you want.

You simply override the createThread method. You will typically pass such an object to a VListenerThread so that it can create your kind of socket thread to manage an incoming connection.

Definition at line 28 of file vsocketthreadfactory.h.


Member Function Documentation

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

Sets the management interface to receive notifications.

May be NULL if no notifications are to be given.

Parameters:
managerthe manager to notify, or NULL

Definition at line 47 of file vsocketthreadfactory.h.

References mManager.

virtual VSocketThread* VSocketThreadFactory::createThread ( VSocket socket,
VListenerThread ownerThread 
) [pure virtual]

Creates a VSocketThread object to communicate on the specified socket.

Parameters:
socketthe socket to initialize the VSocketThread with
ownerThreadthe owner thread to initialize the VSocketThread with
Returns:
the new VSocketThread object

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

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