Apama API Reference for .NET  9.10.0.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Apama.Engine.Api Class Reference

The Api class contains static methods to initialise and stop the client interface. More...

Static Public Member Functions

static EngineManagement ConnectToEngine (string host, ushort port)
 This function attempts to establish a connection to an Engine. It returns an EngineManagement object that can be used to access the Engine. More...
 
static EngineManagement ConnectToEngineMonitorOnly (string host, ushort port)
 Attempt to establish a monitor-only connection to an Engine listening on the named host and port. If successful, the returned EngineManagement can be used for the ConnectEventConsumer(), GetStatus(), InspectEngine() and Ping() operations. All other operations will fail. More...
 
static EngineManagement ConnectToEngineReceiveOnly (string host, ushort port)
 Attempt to establish a receive-only connection to an Engine listening on the named host and port. If successful, the returned EngineManagement can be used for the ConnectEventConsumer(), GetStatus(), InspectEngine() and Ping() operations. All other operations will fail. More...
 
static void DisconnectFromEngine (EngineManagement engineManagement)
 Legacy method equivalent to EngineManagement.Dispose() More...
 
static void EngineInit ()
 This method must be called when the client program is started. It initializes the library's state. Calling it more than once has no effect. More...
 
static void EngineInit (bool messaging)
 This function must be called once per process first before any other Engine operations are carried out. It initializes the library's state. Calling it more than once has no effect. More...
 
static void EngineInit (string name, bool messaging)
 This function must be called once per process first before any other Engine operations are carried out. It initializes the library's state. Calling it more than once has no effect. More...
 
static void EngineShutdown ()
 This function must be called once per process before the application closes down. It ensures that communications are shutdown properly and state is cleaned up. More...
 
static void SetEngineParams ([MarshalAs(UnmanagedType.LPWStr)]string arg0)
 Set custom parameters for this instance of the client library. Must be called before engineInit. The parameters are passed as a set of name, value pairs formatted as <name1>=<value1>;<name2=value2>; (i.e. equals sign between name and value, and semicolon separating the name value pairs). More...
 

Detailed Description

The Api class contains static methods to initialise and stop the client interface.

Member Function Documentation

static EngineManagement Apama.Engine.Api.ConnectToEngine ( string  host,
ushort  port 
)
static

This function attempts to establish a connection to an Engine. It returns an EngineManagement object that can be used to access the Engine.

Parameters
hostThe hostname of the machine where the Engine is running on.
portThe port that the Engine is listening on for transport negotiations with the client.
Returns
An EngineManagement object if an Engine is located and a connection established. Call DisconnectFromEngine when finished with this object.
static EngineManagement Apama.Engine.Api.ConnectToEngineMonitorOnly ( string  host,
ushort  port 
)
static

Attempt to establish a monitor-only connection to an Engine listening on the named host and port. If successful, the returned EngineManagement can be used for the ConnectEventConsumer(), GetStatus(), InspectEngine() and Ping() operations. All other operations will fail.

Parameters
hostThe hostname of the machine where the Engine is running on.
portThe port that the Engine is listening on for transport negotiations with the client.
Returns
An EngineManagement object operating in monitor-only mode. Call DisconnectFromEngine when finished with this object.
static EngineManagement Apama.Engine.Api.ConnectToEngineReceiveOnly ( string  host,
ushort  port 
)
static

Attempt to establish a receive-only connection to an Engine listening on the named host and port. If successful, the returned EngineManagement can be used for the ConnectEventConsumer(), GetStatus(), InspectEngine() and Ping() operations. All other operations will fail.

Parameters
hostThe hostname of the machine where the Engine is running on.
portThe port that the Engine is listening on for transport negotiations with the client.
Returns
An EngineManagement object operating in receive-only mode. Call DisconnectFromEngine when finished with this object.
static void Apama.Engine.Api.DisconnectFromEngine ( EngineManagement  engineManagement)
static

Legacy method equivalent to EngineManagement.Dispose()

Deprecated - Use EngineManagement.Dispose() instead.

Parameters
engineManagementThe Engine to disconnect from.
static void Apama.Engine.Api.EngineInit ( )
static

This method must be called when the client program is started. It initializes the library's state. Calling it more than once has no effect.

static void Apama.Engine.Api.EngineInit ( bool  messaging)
static

This function must be called once per process first before any other Engine operations are carried out. It initializes the library's state. Calling it more than once has no effect.

Parameters
messagingDetermines whether to initialise messaging transport
static void Apama.Engine.Api.EngineInit ( string  name,
bool  messaging 
)
static

This function must be called once per process first before any other Engine operations are carried out. It initializes the library's state. Calling it more than once has no effect.

Parameters
nameThe name of the engine client
messagingDetermines whether to initialise messaging transport
static void Apama.Engine.Api.EngineShutdown ( )
static

This function must be called once per process before the application closes down. It ensures that communications are shutdown properly and state is cleaned up.

The upper .NET API layers (EngineClient, EventService and ScenarioService) use AppDomain.ProcessExit event handler to run shutdown and cleanup operations upon exiting the application. As described in http://msdn.microsoft.com/en-us/library/system.appdomain.processexit.aspx the total execution time of all ProcessExit event handlers is limited, just as the total execution time of all finalizers is limited at process shutdown. The default is three seconds.

static void Apama.Engine.Api.SetEngineParams ( [MarshalAs(UnmanagedType.LPWStr)] string  arg0)
static

Set custom parameters for this instance of the client library. Must be called before engineInit. The parameters are passed as a set of name, value pairs formatted as <name1>=<value1>;<name2=value2>; (i.e. equals sign between name and value, and semicolon separating the name value pairs).

The following parameters are defined so far.

ConfigFile - A filename from which to read a configuration file LogicalID - The logical id with which this component should be identified (a 64-bit integer)

Parameters
arg0The paramters to set as a formatted string
Submit a bug or feature
Copyright (c) 2013-2016 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.