Apama  9.10.0.4.289795
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
AP_EngineManagement_Functions Struct Reference

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...
 

Detailed Description

EngineManagement function API.

Member Function Documentation

AP_EngineManagement_Functions::AP_bool ( AP_ENGINE_CLIENT_CALL *  attachAsEventConsumerTo)

Connect this Engine as an event receiver to another Engine.

Parameters
targetThe Engine to connect to
channelsAn 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.
disconnectSlowdisconnect if slow (may be overridden by correlator configuration or previous connection)
modeIf CONNECT_PARALLEL, connect in parallel
Returns
true if successful
Exceptions
EngineException
AP_EngineManagement_Functions::AP_bool ( AP_ENGINE_CLIENT_CALL *  attachAsEventConsumerToHost)

Connect this Engine as an event receiver to another Engine.

Parameters
hostnameThe hostname of the Engine to connect to
portThe port of the Engine to connect to
channelsAn 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.
disconnectSlowdisconnect if slow (may be overridden by correlator configuration or previous connection)
modeIf CONNECT_PARALLEL, connect in parallel
Returns
true if succesful
Exceptions
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.

Parameters
consumerThe AP_EventConsumer to connect to the Engine.
channelsAn 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.
Returns
A pointer to an AP_EventSupplier resource, which the caller is responsible for freeing, using AP_DeleteEventSupplier().
Exceptions
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).

Parameters
consumerThe AP_EventConsumer to connect to the Engine.
channelsAn 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.
Returns
A pointer to an AP_EventSupplier resource, which the caller is responsible for freeing, using AP_DeleteEventSupplier().
Exceptions
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.

Parameters
consumerThe AP_EventConsumer to connect to the Engine.
channelsAn 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.
Returns
A pointer to an AP_EventSupplier resource, which the caller is responsible for freeing, using AP_DeleteEventSupplier().
Exceptions
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.

Exceptions
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.

Parameters
cdpbytesA pointer to the array of bytes containing the CDP file
sizeThe size of the CDP file
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the AP_DeleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Parameters
cdpbytesA pointer to the array of bytes containing the CDP file
sizeThe size of the CDP file
filenameThe name of the CDP file
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the deleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Parameters
jarbytesA pointer to the array of bytes containing the jar
sizeThe size of the jar
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the AP_DeleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Parameters
jarbytesA pointer to the array of bytes containing the jar
sizeThe size of the jar
filenameThe name of the jar file
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the deleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Parameters
scriptMonitorScript text to be injected.
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the AP_DeleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Parameters
scriptMonitorScript text to be injected.
filenameThe filename the MonitorScript text was injected from
Returns
A pointer to a NULL terminated array of warnings which must be deleted with the deleteWarnings() function, or NULL if there are none
Exceptions
EngineException,whichmay 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.

Returns
Information about the engine.
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  injectMonitorScript)

Inject MonitorScript text into the Engine.

Parameters
scriptMonitorScript text to be injected.
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  injectJava)

Injects a Java application (a jar) into the engine.

Parameters
jarbytesA pointer to the array of bytes containing the jar
sizeThe size of the jar
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  injectCDP)

Injects a CDP (Correlator Deployment Package file) into the engine.

Parameters
cdpbytesA pointer to the array of bytes containing the CDP file
sizeThe size of the CDP file
filenameThe name of the CDP file
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  deleteName)

Delete a named object from the Engine.

Parameters
nameThe name of the object to be deleted.
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  forceDeleteName)

Force deletion of a named object from the Engine.

Parameters
nameThe name of the object to be deleted.
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  killName)

Kill a named monitor in the Engine.

Parameters
nameThe name of the monitor to be killed.
Exceptions
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.

Parameters
targetThe Engine to unsubscribe from.
channelsAn 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.
modeIf CONNECT_PARALLEL, connect in parallel
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  detachAsEventConsumerFromHost)

Unsubscribe as an event receiver from another engine.

Parameters
hostnameThe host of the Engine to unsubscribe from.
portThe port of the Engine to unsubscribe from.
channelsAn 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.
modeIf CONNECT_PARALLEL, connect in parallel
Exceptions
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.

Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  sendEventsNoBatching)

Inject events into the Engine.

Parameters
eventsAn array of pointers to AP_Event instances containing the events to inject into the Engine.
Exceptions
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.

Parameters
eventsAn array of pointers to AP_Event instances containing the events to inject into the Engine.
Exceptions
EngineException
AP_EngineManagement_Functions::void ( AP_ENGINE_CLIENT_CALL *  flushEvents)

Send any outstanding events sent via sendEvents.


The documentation for this struct was generated from the following file: