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);
754 bool includeProps =
true,
766 virtual void enableSSL(
const std::string& caStorePath,
767 bool verifyPeers =
true);
794 virtual void addPeer(
const std::string& hostname,
814 modb::ObjectStore& getStore();
830 void clearTLMutator();
832 class OFFrameworkImpl;
833 OFFrameworkImpl* pimpl;
835 friend class OFFrameworkImpl;
853 virtual void start();
virtual void prettyPrintMODB(std::ostream &output, bool tree=true, bool includeProps=true, bool utf8=true)
Pretty print the current MODB to the provided output stream.
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:49
A mutator represents a set of changes to apply to the data store.
Definition: Mutator.h:60
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:848
Interface definition file for Mutators.
virtual void addPeer(const std::string &hostname, int port)
Add an OpFlex peer.
Interface definition for peer status.