Apama
9.12.0.5
|
EngineManagement function API. More...
#include <engine_client_c.h>
Public Member Functions | |
void (AP_ENGINE_CLIENT_CALL *injectMonitorScript)(AP_EngineManagement *engine | |
Inject MonitorScript text into the Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *injectJava)(AP_EngineManagement *engine | |
Injects a Java application (a jar) into the engine. More... | |
void (AP_ENGINE_CLIENT_CALL *injectCDP)(AP_EngineManagement *engine | |
Injects a CDP (Correlator Deployment Package file) into the engine. More... | |
void (AP_ENGINE_CLIENT_CALL *deleteName)(AP_EngineManagement *engine | |
Delete a named object from the Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *forceDeleteName)(AP_EngineManagement *engine | |
Force deletion of a named object from the Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *killName)(AP_EngineManagement *engine | |
Kill a named monitor in the Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *deleteAll)(AP_EngineManagement *engine) | |
Deletes everything from the engine. More... | |
AP_EngineStatus *AP_ENGINE_CLIENT_CALL * | getStatus (AP_EngineManagement *engine) |
Get the Engine's current operational status. More... | |
AP_EventSupplier *AP_ENGINE_CLIENT_CALL * | connectEventConsumer (AP_EngineManagement *engine, AP_EventConsumer *consumer, const AP_char8 *const *channels) |
Connect an event receiver to the Engine. More... | |
AP_EventSupplier *AP_ENGINE_CLIENT_CALL * | connectDisconnectableEventConsumer (AP_EngineManagement *engine, AP_DisconnectableEventConsumer *consumer, const AP_char8 *const *channels) |
Connect a disconnectable event receiver to the Engine. More... | |
AP_EventSupplier *AP_ENGINE_CLIENT_CALL * | connectDisconnectableSlowEventConsumer (AP_EngineManagement *engine, AP_DisconnectableEventConsumer *consumer, const AP_char8 *const *channels, AP_bool disconnectIfSlow) |
Connect a disconnectable event receiver to the Engine. More... | |
AP_bool (AP_ENGINE_CLIENT_CALL *attachAsEventConsumerTo)(AP_EngineManagement *engine | |
Connect this Engine as an event receiver to another Engine. More... | |
AP_bool (AP_ENGINE_CLIENT_CALL *attachAsEventConsumerToHost)(AP_EngineManagement *engine | |
Connect this Engine as an event receiver to another Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *detachAsEventConsumerFrom)(AP_EngineManagement *engine | |
Unsubscribe as an event receiver from another engine. More... | |
void (AP_ENGINE_CLIENT_CALL *detachAsEventConsumerFromHost)(AP_EngineManagement *engine | |
Unsubscribe as an event receiver from another engine. More... | |
AP_EngineInfo *AP_ENGINE_CLIENT_CALL * | inspectEngine (AP_EngineManagement *engine) |
Returns information about the monitors, event types and container types which exist in the engine. More... | |
void (AP_ENGINE_CLIENT_CALL *ping)(AP_EngineManagement *engine) | |
This method is used to check that the Engine is still alive, potentially reconnecting if needed. More... | |
AP_bool (AP_ENGINE_CLIENT_CALL *isConnected)(AP_EngineManagement *engine) | |
This method is used to check that this object is still connected to the Engine. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectMonitorScriptWithWarnings (AP_EngineManagement *engine, AP_MonitorScript *script) |
Inject MonitorScript text into the Engine, returning any warnings produced by the MonitorScript compiler; maintained for compatibility only, please use injectMonitorScriptWithWarningsFilename instead of this function. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectMonitorScriptWithWarningsFilename (AP_EngineManagement *engine, AP_MonitorScript *script, const char *filename) |
Inject MonitorScript text into the Engine, supplying the filename it was injected from and returning any warnings produced by the MonitorScript compiler. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectJavaWithWarnings (AP_EngineManagement *engine, const AP_uint8 *jarbytes, AP_uint32 size) |
Injects a Java application (a jar) into the engine; maintained for compatibility only, please use injectJavaWithWarningsFilename instead of this function. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectJavaWithWarningsFilename (AP_EngineManagement *engine, const AP_uint8 *jarbytes, AP_uint32 size, const char *filename) |
Injects a Java application (a jar) into the engine. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectCDPWithWarnings (AP_EngineManagement *engine, const AP_uint8 *cdpbytes, AP_uint32 size) |
Injects a CDP (Correlator Deployment Package file) into the engine; maintained for compatibility only, please use injectCDPWithWarningsFilename instead of this function. More... | |
const AP_char8 *const *AP_ENGINE_CLIENT_CALL * | injectCDPWithWarningsFilename (AP_EngineManagement *engine, const AP_uint8 *cdpbytes, AP_uint32 size, const char *filename) |
Injects a CDP (Correlator Deployment Package file) into the engine. More... | |
void (AP_ENGINE_CLIENT_CALL *sendEventsNoBatching)(AP_EngineManagement *engine | |
Inject events into the Engine. More... | |
void (AP_ENGINE_CLIENT_CALL *sendEvents)(AP_EngineManagement *engine | |
Inject events into the Engine (inherited from EventConsumer), automatically batching messages on a separate thread. More... | |
void (AP_ENGINE_CLIENT_CALL *flushEvents)(AP_EngineManagement *engine) | |
Send any outstanding events sent via sendEvents. More... | |
EngineManagement function API.
AP_EngineManagement_Functions::AP_bool | ( | AP_ENGINE_CLIENT_CALL * | attachAsEventConsumerTo | ) |
Connect this Engine as an event receiver to another Engine.
target | The Engine to connect to |
channels | An array of names representing the channels to subscribe to. This is a null-terminated array of pointers to zero-terminated char arrays. If this is null or empty, subscribe to all channels. Note that these channel names should be encoded in UTF-8. and retry it. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
mode | If CONNECT_PARALLEL, connect in parallel |
EngineException |
AP_EngineManagement_Functions::AP_bool | ( | AP_ENGINE_CLIENT_CALL * | attachAsEventConsumerToHost | ) |
Connect this Engine as an event receiver to another Engine.
hostname | The hostname of the Engine to connect to |
port | The port of the Engine to connect to |
channels | An array of names representing the channels to subscribe to. This is a null-terminated array of pointers to zero-terminated char arrays. If this is null or empty, subscribe to all channels. Note that these channel names should be encoded in UTF-8. and retry it. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
mode | If CONNECT_PARALLEL, connect in parallel |
EngineException |
AP_EngineManagement_Functions::AP_bool | ( | AP_ENGINE_CLIENT_CALL * | isConnected | ) |
This method is used to check that this object is still connected to the Engine.
It will never reconnect. Returns true if connected.
AP_EventSupplier* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::connectDisconnectableEventConsumer | ( | AP_EngineManagement * | engine, |
AP_DisconnectableEventConsumer * | consumer, | ||
const AP_char8 *const * | channels | ||
) |
Connect a disconnectable event receiver to the Engine.
consumer | The AP_EventConsumer to connect to the Engine. |
channels | An array of names representing the channels to subscribe to. This is a null-terminated array of pointers to zero-terminated char arrays. If it is null or empty subscribe to all channels. Note that these channel names should be encoded in UTF-8. |
EngineException |
AP_EventSupplier* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::connectDisconnectableSlowEventConsumer | ( | AP_EngineManagement * | engine, |
AP_DisconnectableEventConsumer * | consumer, | ||
const AP_char8 *const * | channels, | ||
AP_bool | disconnectIfSlow | ||
) |
Connect a disconnectable event receiver to the Engine.
It informs the Engine it can disconnect this receiver if it is slow. This may be overridden by correlator configuration (to always disconnect us), or by a previous consumer to the same correlator (the setting is a per connected component setting).
consumer | The AP_EventConsumer to connect to the Engine. |
channels | An array of names representing the channels to subscribe to. This is a null-terminated array of pointers to zero-terminated char arrays. If it is null or empty subscribe to all channels. Note that these channel names should be encoded in UTF-8. |
EngineException |
AP_EventSupplier* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::connectEventConsumer | ( | AP_EngineManagement * | engine, |
AP_EventConsumer * | consumer, | ||
const AP_char8 *const * | channels | ||
) |
Connect an event receiver to the Engine.
consumer | The AP_EventConsumer to connect to the Engine. |
channels | An array of names representing the channels to subscribe to. This is a null-terminated array of pointers to zero-terminated char arrays. If it is null or empty subscribe to all channels. Note that these channel names should be encoded in UTF-8. |
EngineException |
AP_EngineStatus* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::getStatus | ( | AP_EngineManagement * | engine | ) |
Get the Engine's current operational status.
Use AP_DeleteEngineStatus to delete the returned object when it is no longer needed.
EngineException |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectCDPWithWarnings | ( | AP_EngineManagement * | engine, |
const AP_uint8 * | cdpbytes, | ||
AP_uint32 | size | ||
) |
Injects a CDP (Correlator Deployment Package file) into the engine; maintained for compatibility only, please use injectCDPWithWarningsFilename instead of this function.
cdpbytes | A pointer to the array of bytes containing the CDP file |
size | The size of the CDP file |
EngineException,which | may contain warnings as well as an error message |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectCDPWithWarningsFilename | ( | AP_EngineManagement * | engine, |
const AP_uint8 * | cdpbytes, | ||
AP_uint32 | size, | ||
const char * | filename | ||
) |
Injects a CDP (Correlator Deployment Package file) into the engine.
cdpbytes | A pointer to the array of bytes containing the CDP file |
size | The size of the CDP file |
filename | The name of the CDP file |
EngineException,which | may contain warnings as well as an error message |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectJavaWithWarnings | ( | AP_EngineManagement * | engine, |
const AP_uint8 * | jarbytes, | ||
AP_uint32 | size | ||
) |
Injects a Java application (a jar) into the engine; maintained for compatibility only, please use injectJavaWithWarningsFilename instead of this function.
jarbytes | A pointer to the array of bytes containing the jar |
size | The size of the jar |
EngineException,which | may contain warnings as well as an error message |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectJavaWithWarningsFilename | ( | AP_EngineManagement * | engine, |
const AP_uint8 * | jarbytes, | ||
AP_uint32 | size, | ||
const char * | filename | ||
) |
Injects a Java application (a jar) into the engine.
jarbytes | A pointer to the array of bytes containing the jar |
size | The size of the jar |
filename | The name of the jar file |
EngineException,which | may contain warnings as well as an error message |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectMonitorScriptWithWarnings | ( | AP_EngineManagement * | engine, |
AP_MonitorScript * | script | ||
) |
Inject MonitorScript text into the Engine, returning any warnings produced by the MonitorScript compiler; maintained for compatibility only, please use injectMonitorScriptWithWarningsFilename instead of this function.
script | MonitorScript text to be injected. |
EngineException,which | may contain warnings as well as an error message |
const AP_char8* const* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::injectMonitorScriptWithWarningsFilename | ( | AP_EngineManagement * | engine, |
AP_MonitorScript * | script, | ||
const char * | filename | ||
) |
Inject MonitorScript text into the Engine, supplying the filename it was injected from and returning any warnings produced by the MonitorScript compiler.
script | MonitorScript text to be injected. |
filename | The filename the MonitorScript text was injected from |
EngineException,which | may contain warnings as well as an error message |
AP_EngineInfo* AP_ENGINE_CLIENT_CALL* AP_EngineManagement_Functions::inspectEngine | ( | AP_EngineManagement * | engine | ) |
Returns information about the monitors, event types and container types which exist in the engine.
Use AP_DeleteEngineInfo to delete the returned object when it is no longer needed.
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | injectMonitorScript | ) |
Inject MonitorScript text into the Engine.
script | MonitorScript text to be injected. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | injectJava | ) |
Injects a Java application (a jar) into the engine.
jarbytes | A pointer to the array of bytes containing the jar |
size | The size of the jar |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | injectCDP | ) |
Injects a CDP (Correlator Deployment Package file) into the engine.
cdpbytes | A pointer to the array of bytes containing the CDP file |
size | The size of the CDP file |
filename | The name of the CDP file |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | deleteName | ) |
Delete a named object from the Engine.
name | The name of the object to be deleted. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | forceDeleteName | ) |
Force deletion of a named object from the Engine.
name | The name of the object to be deleted. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | killName | ) |
Kill a named monitor in the Engine.
name | The name of the monitor to be killed. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | deleteAll | ) |
Deletes everything from the engine.
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | detachAsEventConsumerFrom | ) |
Unsubscribe as an event receiver from another engine.
target | The Engine to unsubscribe from. |
channels | An array of names representing the channels to unsubscribe from. This is a null-terminated array of pointers to zero-terminated char arrays. If this is null or empty unsubscribe from all channels. |
mode | If CONNECT_PARALLEL, connect in parallel |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | detachAsEventConsumerFromHost | ) |
Unsubscribe as an event receiver from another engine.
hostname | The host of the Engine to unsubscribe from. |
port | The port of the Engine to unsubscribe from. |
channels | An array of names representing the channels to unsubscribe from. This is a null-terminated array of pointers to zero-terminated char arrays. If this is null or empty unsubscribe from all channels. |
mode | If CONNECT_PARALLEL, connect in parallel |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | ping | ) |
This method is used to check that the Engine is still alive, potentially reconnecting if needed.
If the Engine is alive it returns normally. If there is a problem then an EngineException is thrown.
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | sendEventsNoBatching | ) |
Inject events into the Engine.
events | An array of pointers to AP_Event instances containing the events to inject into the Engine. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | sendEvents | ) |
Inject events into the Engine (inherited from EventConsumer), automatically batching messages on a separate thread.
May return before events are sent - call flushEvents before exiting.
events | An array of pointers to AP_Event instances containing the events to inject into the Engine. |
EngineException |
AP_EngineManagement_Functions::void | ( | AP_ENGINE_CLIENT_CALL * | flushEvents | ) |
Send any outstanding events sent via sendEvents.