LogService
libdadi: utility tools for distributed applications
Classes | Public Member Functions | Friends | List of all members
LogCentralComponent_impl Class Reference
Inheritance diagram for LogCentralComponent_impl:
Inheritance graph
[legend]
Collaboration diagram for LogCentralComponent_impl:
Collaboration graph
[legend]

Public Member Functions

 LogCentralComponent_impl (ComponentList *componentList, FilterManagerInterface *filterManager, TimeBuffer *timeBuffer)
 
void test ()
 
CORBA::Short connectComponent (char *&componentName, const char *componentHostname, const char *message, const char *compConfigurator, const log_time_t &componentTime, tag_list_t &initialConfig)
 
CORBA::Short disconnectComponent (const char *componentName, const char *message)
 
void sendBuffer (const log_msg_buf_t &buffer)
 
bool isComponentExists (const char *name, ComponentList::ReadIterator *it)
 
void ping (const char *componentName)
 
void synchronize (const char *componentName, const log_time_t &componentTime)
 
- Public Member Functions inherited from POA_LogCentralComponent
inline::LogCentralComponent_ptr _this ()
 
- Public Member Functions inherited from _impl_LogCentralComponent
virtual ::CORBA::Short connectComponent (char *&componentName, const char *componentHostname, const char *message, const char *compConfigurator, const ::log_time_t &componentTime,::tag_list_t &initialConfig)=0
 
virtual void sendBuffer (const ::log_msg_buf_t &buffer)=0
 
virtual void synchronize (const char *componentName, const ::log_time_t &componentTime)=0
 
virtual _CORBA_Boolean _dispatch (omniCallHandle &)
 

Friends

class LogCentralComponent_impl::AliveCheckThread
 

Member Function Documentation

CORBA::Short LogCentralComponent_impl::connectComponent ( char *&  componentName,
const char *  componentHostname,
const char *  message,
const char *  compConfigurator,
const log_time_t componentTime,
tag_list_t initialConfig 
)

Connect a component to the LogCentral. The component attaches with its name, which must be unique (among all components) and its hostname (no need to be unique). If the name is an empty string, a name is generated. The return value indicates if the component could be connected. If ALREADYEXISTS is returned, another component with the given name is registered. In this case, the connection was not successful, and the tool must connect with a diferent name before invoking other functions of the LogCentralComponent interface.

Parameters
componentNameunique name of the component(cannot be *) or the empty string "" for automatic naming.
componentHostnamehostname of the component
messagemessage to pass to the tools at the connection
compConfiguratorcomponent servant which can process configuration changes for the component
componentTimelocaltime on the component side
initialConfigholds configuration for the components tag filter after the call.
Returns
value indicating if the component could be connected
CORBA::Short LogCentralComponent_impl::disconnectComponent ( const char *  componentName,
const char *  message 
)
virtual

Disconnect a connected component from the LogCentral. No further messages should be sent after disconnection. The componentConfigurator will no longer be used by the LogCentral after this call. Returns NOTCONNECTED if the calling component was not registered.

Parameters
componentNamename of the component
messagemessage to pass to the tools at the disconnection
Returns
value indicating if the component could be disconnected

Implements _impl_LogCentralComponent.

bool LogCentralComponent_impl::isComponentExists ( const char *  name,
ComponentList::ReadIterator it 
)

Tell if a component exists or not.

Parameters
namename of the component to find
Returns
true if the component exists
void LogCentralComponent_impl::ping ( const char *  componentName)
virtual

To be called by a thread for saying that the component is still alive. If the last ping is too old, the component is considered dead and generate a disconnect message (OUT).

Parameters
componentNamethe name of the component who send the ping

Implements _impl_LogCentralComponent.

void LogCentralComponent_impl::sendBuffer ( const log_msg_buf_t buffer)

Send a buffer of log_msg_t to the LogCentral.

Parameters
buffersequence of log_msg_t to be sent
void LogCentralComponent_impl::synchronize ( const char *  componentName,
const log_time_t componentTime 
)

To be called by a thread for clock synchronisation.

Parameters
componentTimelocaltime on the component side
componentNamethe name of the component who send the synchro

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