Public Member Functions | Protected Attributes | List of all members
gov::fnal::cd::rms::provider::RmsConnection Class Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-21/rms/cxx/include/provider/RmsConnection.h"

Inheritance diagram for gov::fnal::cd::rms::provider::RmsConnection:
gov::fnal::cd::rms::provider::EpicsConnection gov::fnal::cd::rms::provider::LocalhostConnection

Public Member Functions

virtual ~RmsConnection ()
 
virtual bool supportsDestination (const base::RmsDestination &candidateDestination)=0
 
virtual void sendString (const base::RmsDestination &dest, const std::string &messageString)=0
 
virtual void sendMessage (const base::RmsDestination &dest, const base::RmsMessage &message)=0
 
virtual void addListener (const base::RmsDestination &dest, ProviderListener *listener)=0
 
virtual void removeListener (const base::RmsDestination &dest, ProviderListener *listener)=0
 
virtual bool ping (const base::RmsDestination &pingDestination)=0
 
base::RmsDestination getMessageSource ()
 
const std::string getUUID ()
 
virtual void close ()=0
 

Protected Attributes

util::UUIDGenerator_uuidGenerator
 
base::RmsDestination _messageSource
 

Detailed Description

This is the interface that every provider must implement in order to work with RMS.

Author
Kurt Biery
Steve Foulkes
Version
Revision
1.2.18.1
Date
2019/09/27 00:07:31

Definition at line 39 of file RmsConnection.h.

Constructor & Destructor Documentation

virtual gov::fnal::cd::rms::provider::RmsConnection::~RmsConnection ( )
inlinevirtual

Virtual destructor to suppress compiler warnings.

Definition at line 44 of file RmsConnection.h.

References addListener(), make_syst_table_plots::dest, datagram_client::message, ping(), removeListener(), sendMessage(), sendString(), string, and supportsDestination().

44  {
45  return;
46  }

Member Function Documentation

virtual void gov::fnal::cd::rms::provider::RmsConnection::addListener ( const base::RmsDestination &  dest,
ProviderListener listener 
)
pure virtual

Add a listener to this provider. Whenever the provider receives messages to this destination, the message will be passed to the listener.

Parameters
destThe destination that messages will be going to.
listenerA reference to the listener that will be called when a message is received by the destination.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

virtual void gov::fnal::cd::rms::provider::RmsConnection::close ( )
pure virtual

Close down the provider and free up any resources that have been allocated.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by getUUID().

base::RmsDestination gov::fnal::cd::rms::provider::RmsConnection::getMessageSource ( )
inline

Get a copy of the message source.

Returns
A destination object that contains the source of messages for this connection.

Definition at line 112 of file RmsConnection.h.

References _messageSource.

112  {
113  return _messageSource;
114  }
const std::string gov::fnal::cd::rms::provider::RmsConnection::getUUID ( )
inline

Get a new human readbale UUID from the UUID generator.

Returns
A new UUID.

Definition at line 121 of file RmsConnection.h.

References _uuidGenerator, close(), and gov::fnal::cd::rms::util::UUIDGenerator::getUUIDHex().

121  {
122  return _uuidGenerator->getUUIDHex();
123  }
virtual bool gov::fnal::cd::rms::provider::RmsConnection::ping ( const base::RmsDestination &  pingDestination)
pure virtual

Ping a destination to see if it is up.

Returns
True if the destination is up, false otherwise.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

virtual void gov::fnal::cd::rms::provider::RmsConnection::removeListener ( const base::RmsDestination &  dest,
ProviderListener listener 
)
pure virtual

Remove a listener from this provider.

Parameters
destThe destination instance to be removed.
listenerThe listener instance to be removed.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

virtual void gov::fnal::cd::rms::provider::RmsConnection::sendMessage ( const base::RmsDestination &  dest,
const base::RmsMessage &  message 
)
pure virtual

Send an RmsMessage to a particular destination.

Parameters
destThe destination to send the message to.
messageThe message to be sent to the destination.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

virtual void gov::fnal::cd::rms::provider::RmsConnection::sendString ( const base::RmsDestination &  dest,
const std::string messageString 
)
pure virtual

Send a string to a particular destination.

Parameters
destThe destination to send the message to.
messageStringThe message to send to the destination.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

virtual bool gov::fnal::cd::rms::provider::RmsConnection::supportsDestination ( const base::RmsDestination &  candidateDestination)
pure virtual

Determine if this provider supports a particular destination.

Parameters
candidateDestinationThe destination to be checked to see if this provider can send messages to it.
Returns
True if messages can be sent to the destination, false otherwise.

Implemented in gov::fnal::cd::rms::provider::EpicsConnection, and gov::fnal::cd::rms::provider::LocalhostConnection.

Referenced by ~RmsConnection().

Member Data Documentation

base::RmsDestination gov::fnal::cd::rms::provider::RmsConnection::_messageSource
protected

A destination to hold the application name and application partition that is passed into the constructor.

Definition at line 141 of file RmsConnection.h.

Referenced by gov::fnal::cd::rms::provider::EpicsConnection::EpicsConnection(), getMessageSource(), and gov::fnal::cd::rms::provider::LocalhostConnection::LocalhostConnection().

util::UUIDGenerator* gov::fnal::cd::rms::provider::RmsConnection::_uuidGenerator
protected

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