|
static mamaBridge | loadBridge (const char *middleware) |
| Load the bridge specified by middleware string. More...
|
|
static mamaBridge | loadBridge (const char *middleware, const char *path) |
| Load the bridge specified by middleware string using the path specified by the user. More...
|
|
static const char * | getVersion (mamaBridge bridgeImpl) |
| Returns the version of the mama binary. More...
|
|
static void | open () |
| Initialize MAMA. More...
|
|
static void | open (const char *path, const char *filename) |
| Initialize MAMA. More...
|
|
static void | setProperty (const char *name, const char *value) |
| Set a specific property for the API. More...
|
|
static const char * | getProperty (const char *name) |
| Retrieve a specific property from the API. More...
|
|
static void | close () |
| Close MAMA and free all associated resource. More...
|
|
static void | start (mamaBridge bridgeImpl) |
| Start processing messages on the internal queue. More...
|
|
static void | startBackground (mamaBridge bridgeImpl, MamaStartCallback *callback) |
| Start processing MAMA internal events in the background. More...
|
|
static void | stop (mamaBridge bridgeImpl) |
| Stop dispatching on the default event queue for the specified bridge. More...
|
|
static void | stopAll (void) |
| Stop dispatching on the default event queue for all bridges. More...
|
|
static void | enableLogging (MamaLogLevel level, FILE *logFile) |
| Enable logging and direct the output to the specified stream. More...
|
|
static void | logToFile (const char *file, MamaLogLevel level) |
| Enable logging to the specified file. More...
|
|
static void | disableLogging (void) |
| Disable logging. More...
|
|
static void | setLogLevel (MamaLogLevel level) |
| Set the logging level. More...
|
|
static MamaLogLevel | getLogLevel (void) |
| Get the logging level. More...
|
|
static void | setLogSize (unsigned long size) |
| Set the maxmum size of the log file (bytes) Default max size is 500 Mb. More...
|
|
static void | setNumLogFiles (int numFiles) |
| Set the number of rolled logfiles to keep before overwriting. More...
|
|
static void | setLogFilePolicy (mamaLogFilePolicy policy) |
| Set the policy regarding how to handle files when Max file size is reached. More...
|
|
static void | setAppendToLogFile (bool append) |
| Set the mode when opening an existing log file. More...
|
|
static bool | loggingToFile (void) |
| Get the status of loggingToFile Returns true if logging to a file, false if not. More...
|
|
static void | setLogSizeCb (MamaLogFileCallback *callback) |
| Set a callback for when the max log size is reached. More...
|
|
static void | setApplicationName (const char *applicationName) |
| Set the mama application name This should be called before Mama.open() More...
|
|
static void | setApplicationClassName (const char *className) |
| Set the mama application class This should be called before Mama.open() More...
|
|
static MamaQueue * | getDefaultEventQueue (mamaBridge bridgeImpl) |
| Get a pointer to the internal default MAMA event queue. More...
|
|
template<typename T > |
static void | deleteObject (T *object) |
| Allow the MAMA API free memory for any objects which have been allocated by the API but responsibility for deleting has been handed to the application code. More...
|
|
static void | setBridgeCallback (mamaBridge bridge, MamaBridgeCallback *callback) |
| Set a MamaBridgeMessageCallback to be invoked whenever information messages are logged at the bridge level. More...
|
|
static void | addStatsCollector (MamaStatsCollector *statsCollector) |
| It adds the newly created statsCollector to the statsGenerator list. More...
|
|
static void | removeStatsCollector (MamaStatsCollector *statsCollector) |
| It removes the statsCollector from the statsGenerator list. More...
|
|
The Mama
class provides methods global initialization and manipulating global options.
static void Wombat::Mama::open |
( |
const char * |
path, |
|
|
const char * |
filename |
|
) |
| |
|
static |
Initialize MAMA.
Allows users of the API to override the default behaviour of Mama.open() where a file mama.properties is required to be located in the directory specified by $WOMBAT_PATH.
The properties file must have the same structure as a standard mama.properties file.
If null is passed as the path the API will look for the properties file on the $WOMBAT_PATH.
If null is passed as the filename the API will look for the default filename of mama.properties.
- Parameters
-
[in] | path | Fully qualified path to the directory containing the properties file |
[in] | filename | The name of the file containing MAMA properties. |
static void Wombat::Mama::setProperty |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
|
static |
Set a specific property for the API.
If the property being set has already been given a value from a properties file that value will be replaced.
See the example mama.properties provided with the distribution for examples of property formatting. The properties set via this function should be formatted in the same manner as those specified in mama.properties.
The strings passed to the function are copied.
- Parameters
-
name | The name of the property |
value | The property value |
static void Wombat::Mama::start |
( |
mamaBridge |
bridgeImpl | ) |
|
|
static |
Start processing messages on the internal queue.
This starts Mama's internal throttle, refresh logic, and other internal Mama processes as well as dispatching messages from the internal queue.
Mama::start( ) blocks until an invocation of Mama::stop() occurs.
MAMA employs a reference count to track multiple calls to Mama::start() and Mama::stop(). The count is incremented every time Mama::start() is called and decremented when Mama::stop() is called. The first Mama::start() call does not unblock until the count reaches zero.
This function is thread safe.
- Parameters
-
[in] | bridgeImpl | The bridge specific structure. |