Name | |
---|---|
native MamaBridge | loadBridge(String middleware, String path) |
MamaBridge | loadBridge(String middleware) |
native MamaPayloadBridge | loadPayloadBridge(String name) |
native MamaQueue | getDefaultQueue(MamaBridge bridge) |
native void | open() |
native void | open(String path, String filename) |
native void | start(MamaBridge bridge) |
native void | startAll(boolean isBlocking) |
void | startAll() |
native void | startBackground(MamaBridge bridge, MamaStartBackgroundCallback callback) |
native void | stop(MamaBridge bridge) |
native void | stopAll() |
native void | close() |
void | enableLogging(Level level) |
void | setLogCallback(MamaLogFileCallback2 callback) |
void | log(MamaLogLevel level, String message) |
void | enableLogging(Level level, String file) |
void | logToFile(String file, Level level) |
void | disableLogging() |
Level | getLogLevel() |
void | setLogLevel(Level level) |
void | setLogFilePolicy(MamaLogFilePolicy policy) |
native String | getProperty(String name) |
native void | loadDefaultProperties() |
String | getProperty(String name, String defaultValue) |
Map< String, String > | getProperties() |
native void | setProperty(String name, String value) |
native void | setLogSize(long size) |
native void | setNumLogFiles(int numFiles) |
native void | setAppendToLogFile(boolean append) |
native boolean | loggingToFile() |
native void | setLogSizeCb(MamaLogFileCallback callback) |
MamaLogLevel | getMamaLogLevelForLevel(Level level) |
int | getMamaLevelForLevel(Level level) |
native void | setApplicationName(String applicationName) |
native void | setApplicationClassName(String applicationClassName) |
native String | getApplicationName() |
native String | getApplicationClassName() |
native String | getCUserName() |
native String | getCHostName() |
String | getUserName() |
String | getHostName() |
String | getIpAddress() |
String | getVersion(MamaBridge bridge) |
native int | getLastErrorCode() |
String | getLastErrorText() |
static native MamaBridge loadBridge(
String middleware,
String path
)
static inline MamaBridge loadBridge(
String middleware
)
static native MamaPayloadBridge loadPayloadBridge(
String name
)
static native MamaQueue getDefaultQueue(
MamaBridge bridge
)
static native void open()
Initialize MAMA.
MAMA employs a reference count to track multiple calls to Mama.open() and Mama.close(). The count is incremented every time Mama.open() is called and decremented when Mama.close() is called. The resources are not actually released until the count reaches zero.
If entitlements are enabled for the library, the available entitlement server names are read from the entitlement.servers property in the mama.properties file located in the $WOMBAT_PATH directory.
This function is thread safe.
static native void open(
String path,
String filename
)
Parameters:
Initialize MAMA.
Allows users of the API to override the default behavior 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.
static native void start(
MamaBridge bridge
)
Parameters:
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.
static native void startAll(
boolean isBlocking
)
Parameters:
Calls Mama::start for all currently loaded middleware bridges
This function is thread safe.
static inline void startAll()
Calls Mama::start for all currently loaded middleware bridges and blocks.
This function is thread safe.
static native void startBackground(
MamaBridge bridge,
MamaStartBackgroundCallback callback
)
Parameters:
Start processing MAMA internal events in the background. This method invokes Mama::start () in a separate thread.
static native void stop(
MamaBridge bridge
)
Parameters:
Stop dispatching on the default event queue for the specified bridge.
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.
static native void stopAll()
Stop dispatching on the default event queue for all bridges.
static native void close()
Close MAMA and free all associated resource.
MAMA employs a reference count to track multiple calls to Mama.open() and Mama.close(). The count is incremented every time Mama.open() is called and decremented when Mama.close() is called. The resources are not actually released until the count reaches zero.
This function is thread safe.
static inline void enableLogging(
Level level
)
static inline void setLogCallback(
MamaLogFileCallback2 callback
)
static inline void log(
MamaLogLevel level,
String message
)
static inline void enableLogging(
Level level,
String file
)
static inline void logToFile(
String file,
Level level
)
static inline void disableLogging()
static inline Level getLogLevel()
static inline void setLogLevel(
Level level
)
static inline void setLogFilePolicy(
MamaLogFilePolicy policy
)
static native String getProperty(
String name
)
Parameters:
Return: the value of the property or NULL if unset.
Retrieve a specific property from the API.
If the property has not been set, a NULL value will be returned.
static native void loadDefaultProperties()
Load in default mama.properties from the default WOMBAT_PATH directory.
static inline String getProperty(
String name,
String defaultValue
)
Parameters:
Return: the value of the property or NULL if unset.
Retrieve a specific property from the API.
If the property has not been set, the default value will be returned.
static inline Map< String, String > getProperties()
Return: A map of all currently configured properties
Retrieve a list of all configured properties in key -> value format
static native void setProperty(
String name,
String value
)
static native void setLogSize(
long size
)
static native void setNumLogFiles(
int numFiles
)
static native void setAppendToLogFile(
boolean append
)
static native boolean loggingToFile()
static native void setLogSizeCb(
MamaLogFileCallback callback
)
static inline MamaLogLevel getMamaLogLevelForLevel(
Level level
)
static inline int getMamaLevelForLevel(
Level level
)
static native void setApplicationName(
String applicationName
)
static native void setApplicationClassName(
String applicationClassName
)
static native String getApplicationName()
static native String getApplicationClassName()
static native String getCUserName()
static native String getCHostName()
static inline String getUserName()
Return: String the user name
getUserName get the user name for the application
static inline String getHostName()
Return: String the hostname
getHostName get the host name of the machine
static inline String getIpAddress()
Return: String the IP address
getIpAddress get the ip address of the machine
static inline String getVersion(
MamaBridge bridge
)
static native int getLastErrorCode()
static inline String getLastErrorText()
Updated on 2023-03-31 at 15:29:42 +0100