![]() |
Apama
10.11.3.3
|
The Engine Management class acts as the interface to the Engine, and allows operations to be carried out on it. More...
#include <engine_client_cpp.hpp>
Public Types | |
enum | ConnectMode { CONNECT_LEGACY, CONNECT_PARALLEL } |
The mode that attachAsEventConsumerTo and detachAsEventConsumerFrom operate in. More... | |
Public Member Functions | |
virtual void | injectMonitorScript (MonitorScript &script)=0 |
Inject EPL text into the Engine. More... | |
virtual const char *const * | injectMonitorScriptWithWarnings (MonitorScript &script)=0 |
Inject EPL text into the Engine, returning any warnings produced by the correlator; maintained for compatibility only, please use injectMonitorScriptWithWarningsFilename instead of this function. More... | |
virtual const char *const * | injectMonitorScriptWithWarningsFilename (MonitorScript &script, const char *filename)=0 |
Inject EPL text into the Engine, supplying the filename it was injected from and returning any warnings produced by the correlator. More... | |
virtual void | deleteName (const char *name)=0 |
Delete a named object from the Engine. More... | |
virtual void | forceDeleteName (const char *name)=0 |
Force deletion of a named object from the Engine. More... | |
virtual void | killName (const char *name)=0 |
Kill a named monitor in the Engine. More... | |
virtual void | deleteAll ()=0 |
Deletes everything from the engine. More... | |
virtual void | injectJava (const AP_uint8 *jarbytes, AP_uint32 size)=0 |
Injects a Java application (a jar) into the engine. More... | |
virtual const char *const * | injectJavaWithWarnings (const AP_uint8 *jarbytes, AP_uint32 size)=0 |
Injects a Java application (a jar) into the engine; maintained for compatibility only, please use injectJavaWithWarningsFilename instead of this function. More... | |
virtual const char *const * | injectJavaWithWarningsFilename (const AP_uint8 *jarbytes, AP_uint32 size, const char *filename)=0 |
Injects a Java application (a jar) into the engine. More... | |
virtual void | injectCDP (const AP_uint8 *cdpbytes, AP_uint32 size, const char *filename=NULL)=0 |
Injects a CDP (Correlator Deployment Package file) into the engine. More... | |
virtual const char *const * | injectCDPWithWarnings (const AP_uint8 *cdpbytes, AP_uint32 size)=0 |
Injects a CDP (Correlator Deployment Package file) into the engine; maintained for compatibility only, please use injectCDPWithWarningsFilename instead of this function. More... | |
virtual const char *const * | injectCDPWithWarningsFilename (const AP_uint8 *cdpbytes, AP_uint32 size, const char *filename)=0 |
Injects a CDP (Correlator Deployment Package file) into the engine. More... | |
EngineStatus | getStatus () |
Get the Engine's current operational status. More... | |
virtual com::apama::event::EventSupplier * | connectEventConsumer (com::apama::event::EventConsumer *consumer, const char *const *channels, bool disconnectSlow)=0 |
Connect an event receiver to the Engine. More... | |
virtual com::apama::event::EventSupplier * | connectEventConsumer (com::apama::event::EventConsumer *consumer, const char *const *channels)=0 |
Connect an event receiver to the Engine. More... | |
virtual bool | attachAsEventConsumerTo (EngineManagement *target, const char *const *channels, bool disconnectSlow=false, ConnectMode mode=CONNECT_LEGACY)=0 |
Connect this Engine as an event receiver to another Engine. More... | |
virtual bool | attachAsEventConsumerTo (const char *host, int port, const char *const *channels, bool disconnectSlow=false, ConnectMode mode=CONNECT_LEGACY)=0 |
Connect this Engine as an event receiver to another Engine. More... | |
virtual void | detachAsEventConsumerFrom (EngineManagement *target, const char *const *channels, ConnectMode mode=CONNECT_LEGACY)=0 |
Unsubscribe as an event receiver from another engine. More... | |
virtual void | detachAsEventConsumerFrom (const char *host, int port, const char *const *channels, ConnectMode mode=CONNECT_LEGACY)=0 |
Unsubscribe as an event receiver from another engine. More... | |
virtual void | sendEvents (const com::apama::event::Event *const *events)=0 |
Inject events into the Engine (inherited from EventConsumer), automatically batching messages on a separate thread. More... | |
virtual void | sendEventsNoBatching (const com::apama::event::Event *const *events)=0 |
Inject events into the Engine. More... | |
virtual void | flushEvents ()=0 |
Send any outstanding events sent via sendEvents. More... | |
virtual EngineInfo * | inspectEngine ()=0 |
Returns information about the monitors, event types and container types which exist in the engine. More... | |
virtual void | ping ()=0 |
This method is used to check that the Engine is still alive. More... | |
virtual bool | isConnected ()=0 |
This method is used to check that this object is still connected to the Engine. More... | |
virtual void | setReceiverConnections (const std::vector< com::apama::engine::EngineConnection > &connections)=0 |
Attaches this component as a persistent receiver of the remote components specified in the connections argument, then decrements the reference count of any existing connections (which typically results in their removal). More... | |
virtual const std::vector< com::apama::engine::EngineConnection > | getReceiverConnections ()=0 |
Get all the persistent connections associated with the engine. More... | |
The Engine Management class acts as the interface to the Engine, and allows operations to be carried out on it.
It is not possible to construct an object of this class. The static methods supplied below in the engine namespace must be used instead.
Because an EngineManagement object is also an EventConsumer, it can have events sent to it (and to the Engine) through its sendEvents() method.
EngineManagement objects are not copiable. EngineManagement objects are created using com::apama::engine::connectToEngine, com::apama::engine::connectToEngineReceiveOnly or com::apama::engine::connectToEngineMonitorOnly. EngineManagement objects are deleted using com::apama::engine::disconnectFromEngine.
|
pure virtual |
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. |
disconnectSlow | disconnect if slow. Only the first consumer's disconnectSlow value is used; subsequent consumers added to this EngineManagement object share the connection and thus the disconnect behaviour. Default is false. |
mode | the connection mode to use, defaults to legacy (single connection, all events delivered to the default channel). Set to CONNECT_PARALLEL for connection per channel and channel values passed through. |
EngineException |
|
pure virtual |
Connect this Engine as an event receiver to another Engine.
host | 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. |
disconnectSlow | disconnect if slow. Only the first consumer's disconnectSlow value is used; subsequent consumers added to this EngineManagement object share the connection and thus the disconnect behaviour. |
mode | the connection mode to use, defaults to legacy (single connection, all events delivered to the default channel). Set to CONNECT_PARALLEL for connection per channel and channel values passed through. |
EngineException |
|
pure virtual |
Connect an event receiver to the Engine.
consumer | The 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. |
disconnectSlow | tell the correlator it can disconnect this receiver if it is slow. Only the first consumer's disconnectSlow value is used; subsequent consumers added to this EngineManagement object share the connection and thus the disconnect behaviour. Defaults to false. |
EngineException |
|
pure virtual |
Connect an event receiver to the Engine.
consumer | The 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 |
|
pure virtual |
Deletes everything from the engine.
|
pure virtual |
Delete a named object from the Engine.
name | The name of the object to be deleted. |
EngineException |
|
pure virtual |
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 | the connection mode to use, defaults to legacy (single connection, all events delivered to the default channel). Set to CONNECT_PARALLEL for connection per channel and channel values passed through. |
EngineException |
|
pure virtual |
Unsubscribe as an event receiver from another engine.
host | 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 | the connection mode to use, defaults to legacy (single connection, all events delivered to the default channel). Set to CONNECT_PARALLEL for connection per channel and channel values passed through. |
EngineException |
|
pure virtual |
Send any outstanding events sent via sendEvents.
|
pure virtual |
Force deletion of a named object from the Engine.
name | The name of the object to be deleted. |
EngineException |
|
pure virtual |
Get all the persistent connections associated with the engine.
|
inline |
Get the Engine's current operational status.
EngineException |
|
pure virtual |
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 |
filename | The name of the CDP file |
EngineException |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
Inject EPL text into the Engine.
script | The EPL text to be injected. |
EngineException |
|
pure virtual |
Inject EPL text into the Engine, returning any warnings produced by the correlator; maintained for compatibility only, please use injectMonitorScriptWithWarningsFilename instead of this function.
script | EPL text to be injected. |
EngineException,which | may contain warnings as well as an error message |
|
pure virtual |
Inject EPL text into the Engine, supplying the filename it was injected from and returning any warnings produced by the correlator.
script | The EPL text to be injected. |
filename | The filename the EPL text was injected from |
EngineException,which | may contain warnings as well as an error message |
|
pure virtual |
Returns information about the monitors, event types and container types which exist in the engine.
Use deleteInfo to delete the returned object when it is no longer needed.
EngineException |
|
pure virtual |
This method is used to check that this object is still connected to the Engine.
It will never reconnect. Returns true if connected.
|
pure virtual |
Kill a named monitor in the Engine.
name | The name of the monitor to be killed. |
EngineException |
|
pure virtual |
This method is used to check that the Engine is still alive.
If the Engine is alive it returns normally. If there is a problem then an EngineException is thrown.
At present, ping() will not attempt to reconnect, and will therefore always throw an exception once the connection is lost. A new management object should be created and the old one cleaned up (disconnected) when reconnection is needed.
EngineException |
|
pure virtual |
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 Event objects containing the events to inject into the Engine. |
EngineException |
Implements com::apama::event::EventConsumer.
|
pure virtual |
Inject events into the Engine.
events | An array of pointers to Event objects containing the events to inject into the Engine. |
EngineException |
|
pure virtual |
Attaches this component as a persistent receiver of the remote components specified in the connections argument, then decrements the reference count of any existing connections (which typically results in their removal).
connections | A vector of EngineConnection objects. The method call doesn't modify the vector. |
This method throws EngineException If the change in the persistent connection set failed. Note that no exception is thrown if some of the specified connections could not be established immediately - in this case the receiver will simply keep trying to reconnect in the background.
EngineException |