573#ifndef OPFLEX_CORE_OFFRAMEWORK_H
574#define OPFLEX_CORE_OFFRAMEWORK_H
579#include <boost/noncopyable.hpp>
601namespace mointernal {
690 const std::string& domain);
702 const std::string& domain,
703 const std::string& location);
756 bool includeProps =
true,
758 size_t truncate = 0);
770 bool verifyPeers =
true);
786 const std::string& keyAndCertFilePath,
787 const std::string& passphrase,
788 bool verifyPeers =
true);
815 virtual void addPeer(
const std::string& hostname,
835 modb::ObjectStore& getStore();
851 void clearTLMutator();
853 class OFFrameworkImpl;
854 OFFrameworkImpl* pimpl;
856 friend class OFFrameworkImpl;
859 friend class MockOFFramework;
872 virtual ~MockOFFramework() {};
Interface definition for main loop adaptor.
Interface definition file for Mutators.
Interface definition for peer status.
A mutator represents a set of changes to apply to the data store.
Definition Mutator.h:61
This is the base class for all managed objects, which are the primary point of interface with data st...
Definition MO.h:48
An adaptor that allows integrating libopflex with an external main loop.
Definition MainLoopAdaptor.h:31
virtual void stop()
Cleanly stop the framework.
virtual void start()
Start the framework.
virtual void start()
Start the framework.
void setOpflexIdentity(const std::string &name, const std::string &domain)
Set the opflex identity information for this framework instance.
static const std::string & getVersionStr()
Get the library version as a string of the format [major].
virtual ~OFFramework()
Destroy the framework instance.
virtual void stop()
Cleanly stop the framework.
OFFramework()
Create a new framework instance.
virtual void dumpMODB(FILE *file)
Dump the managed object database to the file specified as a JSON blob.
virtual MainLoopAdaptor * startSync()
Start the framework in synchronous mode using a main loop adaptor.
virtual void enableSSL(const std::string &caStorePath, bool verifyPeers=true)
Enable SSL for connections to opflex peers.
virtual void registerPeerStatusListener(PeerStatusListener *listener)
Register the given peer status listener to get updates on the health of the connection pool and on in...
static OFFramework & defaultInstance()
Get the static default instance of the framework.
static const std::vector< int > & getVersion()
Get the library version as an vector of three version numbers: major, minor, and release.
virtual void enableSSL(const std::string &caStorePath, const std::string &keyAndCertFilePath, const std::string &passphrase, bool verifyPeers=true)
Enable SSL for connections to opflex peers.
virtual void dumpMODB(const std::string &file)
Dump the managed object database to the file specified as a JSON blob.
virtual void prettyPrintMODB(std::ostream &output, bool tree=true, bool includeProps=true, bool utf8=true, size_t truncate=0)
Pretty print the current MODB to the provided output stream.
void setOpflexIdentity(const std::string &name, const std::string &domain, const std::string &location)
Set the opflex identity information for this framework instance.
void setModel(const modb::ModelMetadata &model)
Add the given model metadata to the managed object database.
virtual void addPeer(const std::string &hostname, int port)
Add an OpFlex peer.
virtual void enableInspector(const std::string &socketName)
Enable the MODB inspector service.
An interface for a listener that will get status update events for peer connection state.
Definition PeerStatusListener.h:30