xorp

FeaIo Class Reference

FEA (Forwarding Engine Abstraction) I/O class. More...

#include <fea_io.hh>

Inheritance diagram for FeaIo:
XrlFeaIo

List of all members.

Public Member Functions

 FeaIo (EventLoop &eventloop)
 Constructor.
virtual ~FeaIo ()
 Destructor.
int startup ()
 Startup the service operation.
int shutdown ()
 Shutdown the service operation.
bool is_running () const
 Test whether the service is running.
EventLoopeventloop ()
 Get the event loop this service is added to.
virtual int add_instance_watch (const string &instance_name, InstanceWatcher *instance_watcher, string &error_msg)
 Add a watcher for the status of a component instance.
virtual int delete_instance_watch (const string &instance_name, InstanceWatcher *instance_watcher, string &error_msg)
 Delete a watcher for the status of a component instance.
virtual void instance_birth (const string &instance_name)
 A component instance has been born.
virtual void instance_death (const string &instance_name)
 A component instance has died.

Protected Member Functions

virtual int register_instance_event_interest (const string &instance_name, string &error_msg)=0
 Register interest in events relating to a particular instance.
virtual int deregister_instance_event_interest (const string &instance_name, string &error_msg)=0
 Deregister interest in events relating to a particular instance.

Private Attributes

EventLoop_eventloop
bool _is_running
list< pair< string,
InstanceWatcher * > > 
_instance_watchers

Detailed Description

FEA (Forwarding Engine Abstraction) I/O class.


Constructor & Destructor Documentation

FeaIo::FeaIo ( EventLoop eventloop)

Constructor.

Parameters:
eventloopthe event loop to use.

Member Function Documentation

int FeaIo::add_instance_watch ( const string &  instance_name,
InstanceWatcher instance_watcher,
string &  error_msg 
) [virtual]

Add a watcher for the status of a component instance.

Parameters:
instance_namethe name of the instance to watch.
instance_watcherthe watcher that tracks the status of the instance.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FeaIo::delete_instance_watch ( const string &  instance_name,
InstanceWatcher instance_watcher,
string &  error_msg 
) [virtual]

Delete a watcher for the status of a component instance.

Parameters:
instance_namethe name of the instance to stop watching.
instance_watcherthe watcher that tracks the status of the instance.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FeaIo::deregister_instance_event_interest ( const string &  instance_name,
string &  error_msg 
) [protected, pure virtual]

Deregister interest in events relating to a particular instance.

Parameters:
instance_namename of target instance to stop event notifications for.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlFeaIo.

EventLoop& FeaIo::eventloop ( ) [inline]

Get the event loop this service is added to.

Returns:
the event loop this service is added to.
void FeaIo::instance_birth ( const string &  instance_name) [virtual]

A component instance has been born.

Parameters:
instance_namethe name of the instance that is born.
void FeaIo::instance_death ( const string &  instance_name) [virtual]

A component instance has died.

Parameters:
instance_namethe name of the instance that has died.
bool FeaIo::is_running ( ) const

Test whether the service is running.

Returns:
true if the service is still running, otherwise false.

Reimplemented in XrlFeaIo.

virtual int FeaIo::register_instance_event_interest ( const string &  instance_name,
string &  error_msg 
) [protected, pure virtual]

Register interest in events relating to a particular instance.

Parameters:
instance_namename of target instance to receive event notifications for.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlFeaIo.

int FeaIo::shutdown ( )

Shutdown the service operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in XrlFeaIo.

int FeaIo::startup ( )

Startup the service operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in XrlFeaIo.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations