Apama API Reference for .NET
10.0.0.2
|
The EngineManagement interface is the primary low-level interface to the Engine, and allows operations to be carried out on it. More...
Inherits Apama.Event.EventConsumer.
Public Types | |
enum | ConnectMode { CONNECT_LEGACY, CONNECT_PARALLEL } |
Enumeration for selecting the mode to use for connecting Correlators together. More... | |
Public Member Functions | |
bool | AttachAsEventConsumerTo (EngineManagement target, string[] channels, bool disconnectSlow, EngineManagement.ConnectMode mode) |
Connect this Engine as an event receiver to another Engine More... | |
bool | AttachAsEventConsumerTo (EngineManagement target, string[] channels, bool disconnectSlow) |
Connect this Engine as an event receiver to another Engine More... | |
bool | AttachAsEventConsumerTo (EngineManagement target, string[] channels) |
Connect this Engine as an event receiver to another Engine More... | |
bool | AttachAsEventConsumerTo ([MarshalAs(UnmanagedType.LPWStr)]string host, int port, string[] channels, bool disconnectSlow, EngineManagement.ConnectMode mode) |
Connect this Engine as an event receiver to another Engine More... | |
bool | AttachAsEventConsumerTo ([MarshalAs(UnmanagedType.LPWStr)]string host, int port, string[] channels, bool disconnectSlow) |
Connect this Engine as an event receiver to another Engine More... | |
bool | AttachAsEventConsumerTo ([MarshalAs(UnmanagedType.LPWStr)]string host, int port, string[] channels) |
Connect this Engine as an event receiver to another Engine More... | |
EventSupplier | ConnectEventConsumer (EventConsumer consumer, string[] channels, bool disconnectSlow) |
Connect an event receiver to the Engine. More... | |
EventSupplier | ConnectEventConsumer (EventConsumer consumer, string[] channels) |
Connect an event receiver to the Engine. More... | |
void | DeleteAll () |
Deletes everything from the engine More... | |
void | DeleteName ([MarshalAs(UnmanagedType.LPWStr)]string name) |
Delete a named object from the Engine. More... | |
void | DetachAsEventConsumerFrom (EngineManagement target, string[] channels, EngineManagement.ConnectMode mode) |
Unsubscribe this Engine as an event receiver from another Engine More... | |
void | DetachAsEventConsumerFrom (EngineManagement target, string[] channels) |
Unsubscribe this Engine as an event receiver from another Engine More... | |
void | DetachAsEventConsumerFrom ([MarshalAs(UnmanagedType.LPWStr)]string host, int port, string[] channels, EngineManagement.ConnectMode mode) |
Unsubscribe this Engine as an event receiver from another Engine More... | |
void | DetachAsEventConsumerFrom ([MarshalAs(UnmanagedType.LPWStr)]string host, int port, string[] channels) |
Unsubscribe this Engine as an event receiver from another Engine More... | |
virtual void | Disconnect () |
Disconnect this client completely from the remote component. More... | |
override void | Dispose () |
Must be called to free unmanaged resources associated with this object. More... | |
void | FlushEvents () |
Flush events sent to the Engine using SendEvents(Event[]). More... | |
void | ForceDeleteName ([MarshalAs(UnmanagedType.LPWStr)]string name) |
Force deletion of a named object from the Engine. More... | |
EngineConnection[] | GetReceiverConnections () |
Get all the persistent connections associated with the engine. More... | |
Apama.Engine.EngineStatus | GetStatus () |
Get the Engine's current operational status. More... | |
virtual string[] | InjectCDP (byte[] cdpbytes, String filename) |
Injects a CDP (Correlator Deployment package) into the engine. More... | |
virtual string[] | InjectCDP (byte[] cdpbytes) |
Injects a CDP (Correlator Deployment package) into the engine. More... | |
virtual string[] | InjectJava (byte[] jarbytes) |
Injects a Java application (a jar) into the engine. More... | |
string[] | InjectMonitorScript (MonitorScript mon) |
Inject MonitorScript text into the Engine. More... | |
string[] | InjectMonitorScript (string monitorscript) |
Inject MonitorScript text into the Engine. More... | |
string[] | InjectMonitorScript (string script, string fileName) |
Inject MonitorScript text into the Engine. More... | |
Apama.Engine.EngineInfo | InspectEngine () |
Returns information about the monitors, event types, timers aggregates which exist in the engine. More... | |
bool | IsConnected () |
This method is used to check that this object is still connected to the Engine. It will never reconnect. More... | |
void | KillName ([MarshalAs(UnmanagedType.LPWStr)]string name) |
Kill a named object in the Engine. Note that this will kill running monitors in such as way as to break the fault tolerance scheme. More... | |
void | Ping () |
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 once the initial connection is lost. More... | |
override void | SendEvents (Event[] events) |
Send events into the Engine (inherited from EventConsumer), automatically rebatching the actual event sending for efficiency. More... | |
void | SendEventsNoBatching (Event[] events) |
Send events into the Engine without rebatching the actual event sending. More... | |
void | SetReceiverConnections (params EngineConnection[] connections) |
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... | |
override string | ToString () |
Returns a string that represents the object. More... | |
Public Member Functions inherited from Apama.Event.EventConsumer | |
override string | ToString () |
Returns a string that represents the object. More... | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Virtual helper method to implement Dispose() More... | |
Properties | |
bool | ReconnectOnSend [get, set] |
Determines whether the disconnected client should implicitly attempt to reconnect when sending events or injecting MonitorScript. More... | |
ulong | RemotePhysicalComponentID [get] |
Obtain a unique ID for the component that this object is connected to. More... | |
The EngineManagement interface is the primary low-level interface to the Engine, and allows operations to be carried out on it.
The static methods of the EngineManagementFactory class are used to create an object implementing this interface. Because an EngineManagement object is also an EventConsumer, it can have events sent to it (and to the Engine) through its SendEvents() method.
Do not call Disconnect() or DetachAsEventConsumerFrom() synchronously from consumer code.
Note that for most applications it is recommended to use the higher-level interfaces provided by Apama.Engine.Client.IEngineClient or Apama.Services.Event.IEventService instead of the low-level EngineManagement interface.
Enumeration for selecting the mode to use for connecting Correlators together.
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | EngineManagement | target, |
string[] | channels, | ||
bool | disconnectSlow, | ||
EngineManagement.ConnectMode | mode | ||
) |
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. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
mode | which mode to connect using |
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | EngineManagement | target, |
string[] | channels, | ||
bool | disconnectSlow | ||
) |
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. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | EngineManagement | target, |
string[] | channels | ||
) |
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. |
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | [MarshalAs(UnmanagedType.LPWStr)] string | host, |
int | port, | ||
string[] | channels, | ||
bool | disconnectSlow, | ||
EngineManagement.ConnectMode | mode | ||
) |
Connect this Engine as an event receiver to another Engine
host | Hostname of the Engine to connect to. |
port | Port of the Engine to connect to. |
channels | An array of names representing the channels to subscribe to. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
mode | which mode to connect using |
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | [MarshalAs(UnmanagedType.LPWStr)] string | host, |
int | port, | ||
string[] | channels, | ||
bool | disconnectSlow | ||
) |
Connect this Engine as an event receiver to another Engine
host | Hostname of the Engine to connect to. |
port | Port of the Engine to connect to. |
channels | An array of names representing the channels to subscribe to. |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.AttachAsEventConsumerTo | ( | [MarshalAs(UnmanagedType.LPWStr)] string | host, |
int | port, | ||
string[] | channels | ||
) |
Connect this Engine as an event receiver to another Engine
host | Hostname of the Engine to connect to. |
port | Port of the Engine to connect to. |
channels | An array of names representing the channels to subscribe to. |
Apama.EngineException | If an error occurs while performing this operation. |
EventSupplier Apama.Engine.EngineManagement.ConnectEventConsumer | ( | EventConsumer | consumer, |
string[] | channels, | ||
bool | disconnectSlow | ||
) |
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 |
disconnectSlow | disconnect if slow (may be overridden by correlator configuration or previous connection) |
Apama.EngineException | If an error occurs while performing this operation. |
EventSupplier Apama.Engine.EngineManagement.ConnectEventConsumer | ( | EventConsumer | consumer, |
string[] | channels | ||
) |
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 |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DeleteAll | ( | ) |
Deletes everything from the engine
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DeleteName | ( | [MarshalAs(UnmanagedType.LPWStr)] string | name | ) |
Delete a named object from the Engine.
name | The name of the object to be deleted. |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DetachAsEventConsumerFrom | ( | EngineManagement | target, |
string[] | channels, | ||
EngineManagement.ConnectMode | mode | ||
) |
Unsubscribe this Engine as an event receiver from another Engine
target | Hostname of the Engine to unsubscribe from. |
channels | An array of names representing the channels to subscribe to. |
mode | which mode to connect using |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DetachAsEventConsumerFrom | ( | EngineManagement | target, |
string[] | channels | ||
) |
Unsubscribe this Engine as an event receiver from another Engine
target | Hostname of the Engine to unsubscribe from. |
channels | An array of names representing the channels to subscribe to. |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DetachAsEventConsumerFrom | ( | [MarshalAs(UnmanagedType.LPWStr)] string | host, |
int | port, | ||
string[] | channels, | ||
EngineManagement.ConnectMode | mode | ||
) |
Unsubscribe this Engine as an event receiver from another Engine
host | Hostname of the Engine to unsubscribe from. |
port | Port of the Engine to unsubscribe from. |
channels | An array of names representing the channels to subscribe to. |
mode | which mode to connect using |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.DetachAsEventConsumerFrom | ( | [MarshalAs(UnmanagedType.LPWStr)] string | host, |
int | port, | ||
string[] | channels | ||
) |
Unsubscribe this Engine as an event receiver from another Engine
host | Hostname of the Engine to unsubscribe from. |
port | Port of the Engine to unsubscribe from. |
channels | An array of names representing the channels to subscribe to. |
Apama.EngineException | If an error occurs while performing this operation. |
|
virtual |
Disconnect this client completely from the remote component.
Even if this method has been called, it is still necessary to Dispose() when this object is no longer needed, so in most cases there is no need to directly call Disconnect().
|
virtual |
Must be called to free unmanaged resources associated with this object.
Reimplemented from Apama.Event.EventConsumer.
|
protectedvirtual |
Virtual helper method to implement Dispose()
Reimplemented from Apama.Event.EventConsumer.
void Apama.Engine.EngineManagement.FlushEvents | ( | ) |
Flush events sent to the Engine using SendEvents(Event[]).
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.ForceDeleteName | ( | [MarshalAs(UnmanagedType.LPWStr)] string | name | ) |
Force deletion of a named object from the Engine.
name | The name of the object to be deleted. |
Apama.EngineException | If an error occurs while performing this operation. |
EngineConnection [] Apama.Engine.EngineManagement.GetReceiverConnections | ( | ) |
Get all the persistent connections associated with the engine.
Apama.EngineException | Thrown if any exceptions occur in the Client SDK. |
Apama.Engine.EngineStatus Apama.Engine.EngineManagement.GetStatus | ( | ) |
Get the Engine's current operational status.
Apama.EngineException | If an error occurs while performing this operation. |
|
virtual |
Injects a CDP (Correlator Deployment package) into the engine.
cdpbytes | A byte array of containing the CDP file. |
filename | The file we are injecting. |
Apama.EngineException | This may contain warnings as well as an error message |
|
virtual |
Injects a CDP (Correlator Deployment package) into the engine.
cdpbytes | A byte array of containing the CDP file. |
Apama.EngineException | This may contain warnings as well as an error message |
|
virtual |
Injects a Java application (a jar) into the engine.
jarbytes | A byte array of containing the jar. |
Apama.EngineException | This may contain warnings as well as an error message |
string [] Apama.Engine.EngineManagement.InjectMonitorScript | ( | MonitorScript | mon | ) |
Inject MonitorScript text into the Engine.
Deprecated - Use InjectMonitorScript(string) instead.
mon | A MonitorScript instance representing the script to be injected |
string [] Apama.Engine.EngineManagement.InjectMonitorScript | ( | string | monitorscript | ) |
Inject MonitorScript text into the Engine.
monitorscript | A MonitorScript string representing the script to be injected |
string [] Apama.Engine.EngineManagement.InjectMonitorScript | ( | string | script, |
string | fileName | ||
) |
Inject MonitorScript text into the Engine.
script | A MonitorScript string representing the script to be injected |
fileName | Identifies the filename that the MonitorScript came from, which is then included in diagnostic log messages. |
Apama.Engine.EngineInfo Apama.Engine.EngineManagement.InspectEngine | ( | ) |
Returns information about the monitors, event types, timers aggregates which exist in the engine.
Apama.EngineException | If an error occurs while performing this operation. |
bool Apama.Engine.EngineManagement.IsConnected | ( | ) |
This method is used to check that this object is still connected to the Engine. It will never reconnect.
void Apama.Engine.EngineManagement.KillName | ( | [MarshalAs(UnmanagedType.LPWStr)] string | name | ) |
Kill a named object in the Engine. Note that this will kill running monitors in such as way as to break the fault tolerance scheme.
name | The name of the object to be killed. |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.Ping | ( | ) |
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 once the initial connection is lost.
Apama.EngineException | If an error occurs while performing this operation. |
|
virtual |
Send events into the Engine (inherited from EventConsumer), automatically rebatching the actual event sending for efficiency.
events | An array of events to send |
Apama.EngineException | If an error occurs while performing this operation. |
Reimplemented from Apama.Event.EventConsumer.
void Apama.Engine.EngineManagement.SendEventsNoBatching | ( | Event[] | events | ) |
Send events into the Engine without rebatching the actual event sending.
events | An array of events to send |
Apama.EngineException | If an error occurs while performing this operation. |
void Apama.Engine.EngineManagement.SetReceiverConnections | ( | params EngineConnection[] | connections | ) |
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 | An array of Apama.Engine.EngineConnection. Must not contain null elements. |
Apama.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.
override string Apama.Engine.EngineManagement.ToString | ( | ) |
Returns a string that represents the object.
|
getset |
Determines whether the disconnected client should implicitly attempt to reconnect when sending events or injecting MonitorScript.
|
get |
Obtain a unique ID for the component that this object is connected to.
The physical ID is the same for a given process, so connecting to the same process should yield the same physical component ID. Restarting the process will yield a different ID, even if re-started on the same host and port. (This is the same ID logged in server log files)