commore  1.0.6-SNAPSHOT
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
commore::PServiceManager Class Reference

#include <Service.h>

Public Member Functions

 PServiceManager (const PServiceManager &p)
 
PServiceManageroperator= (const PServiceManager &p)
 
Impl * get_impl () const
 
Impl * get () const
 
long publish (const PService &service)
 
long unpublish (const PService &service)
 
bool add_listener (const AChar *spec)
 
bool add_listener (const PListener &listener)
 
bool remove_listener (const AChar *spec)
 
bool remove_listener (const PListener &listener)
 
ListAStringget_addresses (ListAString &addresses) const
 
PService getMyService (const char *className, const char *name)
 
PServiceManageroperator-> ()
 
const PServiceManageroperator-> () const
 

Static Public Member Functions

static long get_managers_of (const PService &service, List< PServiceManager > &managers)
 
static PService getService (const char *className, const char *name)
 

Detailed Description

Service manager: manage a collection of service and listener When a listener receives a message it tries to find a service to respond.

Remarks
PServiceManager behave like an AutoRef for copy and assaigment operartor.

Member Function Documentation

bool commore::PServiceManager::add_listener ( const AChar *  spec)

Add a listener specified by connection string

bool commore::PServiceManager::add_listener ( const PListener listener)

Add a listener by reference

ListAString& commore::PServiceManager::get_addresses ( ListAString addresses) const

Recover addresses on which the services of service manager can be contacted

Returns
addresse list
Remarks
check usefull
Impl* commore::PServiceManager::get_impl ( ) const
inline
Returns
pointer on implementation
Remarks
internal use
static long commore::PServiceManager::get_managers_of ( const PService service,
List< PServiceManager > &  managers 
)
static

Get associated ServiceManager with specified service

Returns
number of ServiceManager where service is published,
PService commore::PServiceManager::getMyService ( const char *  className,
const char *  name 
)

Get a service published by 'this' service manager Select by name and class name.

static PService commore::PServiceManager::getService ( const char *  className,
const char *  name 
)
static

Get a publihed service : look in all service managers

PServiceManager* commore::PServiceManager::operator-> ( )
inline

Compatibility whith AutoRef

long commore::PServiceManager::publish ( const PService service)

Add a service to service manager managed list.

bool commore::PServiceManager::remove_listener ( const AChar *  spec)

Remove a listener by connection string

Remarks
not implemented
bool commore::PServiceManager::remove_listener ( const PListener listener)

Remove a listener by reference

Returns
true if succeed
long commore::PServiceManager::unpublish ( const PService service)

Remove a service from managed service list


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