OpFlex Framework
1.7.0
|
A mock framework object that will not attempt to create remote connections or resolve references. More...
#include <opflex/ofcore/OFFramework.h>
Public Member Functions | |
virtual void | start () |
Start the framework. More... | |
virtual void | stop () |
Cleanly stop the framework. | |
![]() | |
OFFramework () | |
Create a new framework instance. | |
virtual | ~OFFramework () |
Destroy the framework instance. | |
void | setModel (const modb::ModelMetadata &model) |
Add the given model metadata to the managed object database. More... | |
void | setOpflexIdentity (const std::string &name, const std::string &domain) |
Set the opflex identity information for this framework instance. More... | |
void | setOpflexIdentity (const std::string &name, const std::string &domain, const std::string &location) |
Set the opflex identity information for this framework instance. More... | |
virtual MainLoopAdaptor * | startSync () |
Start the framework in synchronous mode using a main loop adaptor. More... | |
virtual void | dumpMODB (const std::string &file) |
Dump the managed object database to the file specified as a JSON blob. More... | |
virtual void | dumpMODB (FILE *file) |
Dump the managed object database to the file specified as a JSON blob. More... | |
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. More... | |
virtual void | enableSSL (const std::string &caStorePath, bool verifyPeers=true) |
Enable SSL for connections to opflex peers. More... | |
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. More... | |
virtual void | enableInspector (const std::string &socketName) |
Enable the MODB inspector service. More... | |
virtual void | addPeer (const std::string &hostname, int port) |
Add an OpFlex peer. More... | |
virtual void | registerPeerStatusListener (PeerStatusListener *listener) |
Register the given peer status listener to get updates on the health of the connection pool and on individual connections. More... | |
Additional Inherited Members | |
![]() | |
static const std::vector< int > & | getVersion () |
Get the library version as an vector of three version numbers: major, minor, and release. | |
static const std::string & | getVersionStr () |
Get the library version as a string of the format [major]. More... | |
static OFFramework & | defaultInstance () |
Get the static default instance of the framework. | |
A mock framework object that will not attempt to create remote connections or resolve references.
This is useful for unit tests for code that uses the framework, since you can easily write into the store the objects that would have been resolved remotely without any interference.
|
virtual |
Start the framework.
This will start all the framework threads and attempt to connect to configured OpFlex peers.
Reimplemented from opflex::ofcore::OFFramework.