Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlsMvEndPointFactory Class Reference

This class is the front interface of the component factories of Server, The components are IlsMvComponent and IlsMvComponentItf instances, created by the factories IlsMvEndPointFactory, IlsSrvEndPointFactory and IlsMvComponentFactory. More...

#include <ilserver/mvendpt.h>

Inheritance diagram for IlsMvEndPointFactory:
IlsSrvEndPointFactory

Public Member Functions

 IlsMvEndPointFactory ()
 Constructor. More...
 
virtual ~IlsMvEndPointFactory ()
 Destructor. More...
 
virtual IlsMvEndPointnewComponent ()
 Called by the NewComponent() static function to create a new instance of an IlsMvComponent class or subclass. More...
 
virtual IlsMvEndPointnewComponentItf ()
 Called by the NewComponentItf() static function to create a new instance of an IlsMvComponentItf class or subclass. More...
 

Static Public Member Functions

static IlsMvEndPointFactoryGetSingleton ()
 Returns a reference to the component factory. More...
 
static IlsMvEndPointFactoryGetSingletonPtr ()
 Returns a pointer to the component factory. More...
 
static IlsMvEndPointNewComponent ()
 Called by Server to create a new instance of the IlsMvComponent class. More...
 
static IlsMvEndPointNewComponentItf ()
 Called by Server to create a new instance of the IlsMvComponentItf class. More...
 
static IlsMvEndPointFactorySetSingleton (IlsMvEndPointFactory *componentFactory)
 Declares the object pointed by componentFactory as the component factory singleton. More...
 

Detailed Description

This class is the front interface of the component factories of Server, The components are IlsMvComponent and IlsMvComponentItf instances, created by the factories IlsMvEndPointFactory, IlsSrvEndPointFactory and IlsMvComponentFactory.

Library: mvserver
and mvcomp

Front interface means that IlsMvProcess calls the static functions NewComponent() and NewComponentItf of this class to get component instances. Then IlsMvEndPointFactory::NewComponent() calls another factory class, IlsMvComponentFactory, to get IlsMvComponent instances.

In addition of being the front interface, IlsMvEndPointFactory is a factory too, newComponent() and newComponentItf being the instance providers. Note that this is not the default factory of Server, the default is the subclass IlsSrvEndPointFactory, which is set with SetSingleton() in the constructor of IlsMvServer.

See IlsMvComponentFactory and IlsMvComponent to have more details about IlsMvComponents. See IlsMvComponentItf to have more details about IlsMvComponentItfs.

By subclassing IlsMvEndPointFactory and overriding the newInstance() and newComponentItf() functions, you can create your own subtypes of IlsMvComponent and IlsMvComponentItf.

See also
IlsMvComponent, IlsMvComponentItf, IlsMvComponentFactory

Constructor & Destructor Documentation

◆ IlsMvEndPointFactory()

IlsMvEndPointFactory::IlsMvEndPointFactory ( )

Constructor.

The construction of an IlsMvEndPointFactory object is triggered either by the function GetSingleton() or by the construction of a IlsMvComponentItf.

◆ ~IlsMvEndPointFactory()

virtual IlsMvEndPointFactory::~IlsMvEndPointFactory ( )
virtual

Destructor.

The destruction of the singleton is automatically performed at process exit.

Member Function Documentation

◆ GetSingleton()

static IlsMvEndPointFactory& IlsMvEndPointFactory::GetSingleton ( )
static

Returns a reference to the component factory.

If no factory has been declared yet, an instance of IlsMvEndPointFactory is automatically created. It is declared as the class singleton using the SetSingleton() member function and returned as the result of this function.

Returns
reference to the component factory singleton

◆ GetSingletonPtr()

static IlsMvEndPointFactory* IlsMvEndPointFactory::GetSingletonPtr ( )
static

Returns a pointer to the component factory.

If no factory has been declared yet, returns 0.

Returns
Pointer to the component factory singleton

◆ newComponent()

virtual IlsMvEndPoint* IlsMvEndPointFactory::newComponent ( )
virtual

Called by the NewComponent() static function to create a new instance of an IlsMvComponent class or subclass.

This implementation calls another factory class, IlsMvComponentFactory, to get IlsMvComponent instances. You must override it if you want Server to create instances of a specific derived class.

See also
GetSingleton(), NewComponent().
Returns
pointer to the new instance

◆ NewComponent()

static IlsMvEndPoint* IlsMvEndPointFactory::NewComponent ( )
static

Called by Server to create a new instance of the IlsMvComponent class.

It calls the newComponent() function on the class singleton (see GetSingleton()).

Returns
a pointer to the new instance

◆ newComponentItf()

virtual IlsMvEndPoint* IlsMvEndPointFactory::newComponentItf ( )
virtual

Called by the NewComponentItf() static function to create a new instance of an IlsMvComponentItf class or subclass.

This implementation returns 0. You must override it if you want Server to create instances of a specific derived class.

See also
GetSingleton(), NewComponentItf().
Returns
0

Reimplemented in IlsSrvEndPointFactory.

◆ NewComponentItf()

static IlsMvEndPoint* IlsMvEndPointFactory::NewComponentItf ( )
static

Called by Server to create a new instance of the IlsMvComponentItf class.

It calls the newComponentItf() function on the class singleton (see GetSingleton()).

Returns
a pointer to the new instance

◆ SetSingleton()

static IlsMvEndPointFactory* IlsMvEndPointFactory::SetSingleton ( IlsMvEndPointFactory componentFactory)
static

Declares the object pointed by componentFactory as the component factory singleton.

If componentFactory is null, the component factory singleton no longer exists. This function returns the address of the previous current component factory or, by default, the null pointer. Server doesn't delete the previous factory, it must be stored or deleted.

Parameters
componentFactoryPointer to the new singleton
Returns
pointer to the previous singleton