573 #ifndef OPFLEX_CORE_OFFRAMEWORK_H
574 #define OPFLEX_CORE_OFFRAMEWORK_H
579 #include <boost/noncopyable.hpp>
601 namespace mointernal {
690 const std::string& domain);
702 const std::string& domain,
703 const std::string& location);
709 virtual void start();
734 virtual void dumpMODB(
const std::string& file);
756 bool includeProps =
true,
758 size_t truncate = 0);
769 virtual void enableSSL(
const std::string& caStorePath,
770 bool verifyPeers =
true);
785 virtual void enableSSL(
const std::string& caStorePath,
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;
874 virtual void start();
virtual ~OFFramework()
Destroy the framework instance.
static OFFramework & defaultInstance()
Get the static default instance of the framework.
This is the base class for all managed objects, which are the primary point of interface with data st...
Definition: MO.h:48
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.
A mutator represents a set of changes to apply to the data store.
Definition: Mutator.h:61
virtual MainLoopAdaptor * startSync()
Start the framework in synchronous mode using a main loop adaptor.
static const std::vector< int > & getVersion()
Get the library version as an vector of three version numbers: major, minor, and release.
OFFramework()
Create a new framework instance.
virtual void enableInspector(const std::string &socketName)
Enable the MODB inspector service.
Main interface to the OpFlex framework.
Definition: OFFramework.h:644
static const std::string & getVersionStr()
Get the library version as a string of the format [major].
virtual void registerPeerStatusListener(PeerStatusListener *listener)
Register the given peer status listener to get updates on the health of the connection pool and on in...
Interface definition for main loop adaptor.
virtual void stop()
Cleanly stop the framework.
virtual void dumpMODB(const std::string &file)
Dump the managed object database to the file specified as a JSON blob.
void setOpflexIdentity(const std::string &name, const std::string &domain)
Set the opflex identity information for this framework instance.
virtual void stop()
Cleanly stop the framework.
virtual void enableSSL(const std::string &caStorePath, bool verifyPeers=true)
Enable SSL for connections to opflex peers.
void setModel(const modb::ModelMetadata &model)
Add the given model metadata to the managed object database.
An interface for a listener that will get status update events for peer connection state...
Definition: PeerStatusListener.h:30
virtual void start()
Start the framework.
virtual void start()
Start the framework.
An adaptor that allows integrating libopflex with an external main loop.
Definition: MainLoopAdaptor.h:31
A mock framework object that will not attempt to create remote connections or resolve references...
Definition: OFFramework.h:869
Interface definition file for Mutators.
virtual void addPeer(const std::string &hostname, int port)
Add an OpFlex peer.
Interface definition for peer status.