ibi Patterns .NET API
|
Create connections to the ibi™ Patterns - Search Server. More...
Public Types | |
enum | ProtocolChoice { DEFAULT , IPV4_ONLY , IPV6_ONLY , MIXED } |
Network protocol options for connecting to an ibi™ Patterns - Search Server. More... | |
Public Member Functions | |
NetricsConMgr () | |
Create a connection manager. More... | |
String | getHost () |
Return the current ibi™ Patterns - Search host machine. More... | |
void | setHost (String host) |
int | getPort () |
void | setDebugOn () |
Set debug logging on. More... | |
void | setDebugOff () |
Set debug logging off. More... | |
bool | isDebugOn () |
Return true if the debug setting is turned on. | |
void | setConnectionPoolingOff () |
Turn off connection pooling. More... | |
void | setConnectionPoolingCommon () |
Set connection pooling to common mode. More... | |
void | setConnectionPoolingLocal () |
Set connection pooling to local mode. More... | |
bool | isConnectionPoolingCommon () |
Return true if the current connection pooling setting is common mode. | |
bool | isConnectionPoolingLocal () |
Return true if the current connection pooling setting is local mode. | |
void | setNetProtocols (NetricsConMgr.ProtocolChoice protocols) |
Set the network protocols that will be used to connect to the ibi™ Patterns - Search Server. More... | |
NetricsServerInterface | newConnection () |
Create a new connection. More... | |
NetricsTransaction | beginWork () |
Create a new transaction connection. More... | |
NetricsTransaction | continueWork (long tran_id) |
bool | getSSLEnabled () |
Returns More... | |
void | setSSLEnabled (bool enable) |
Sets the SSL enable flag. More... | |
RemoteCertificateValidationCallback | getCertificateValidator () |
Get the current certificate-validation callback. More... | |
void | setCertificateValidator (RemoteCertificateValidationCallback certValidator) |
Sets the certificate-validation callback. More... | |
Static Public Member Functions | |
static bool | DefaultCertificateValidator (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) |
Ignores server-name mismatches in certificate validation. More... | |
Create connections to the ibi™ Patterns - Search Server.
This is a factory class used to create a connection to the ibi™ Patterns - Search Server. Each object of this class is associated with a particular ibi™ Patterns - Search Server and contains all of the information necessary to connect to the engine. All of this information has default values, and an associated environment variable. Methods are provided to override these settings. If a value is set via a method call that value takes precedence, otherwise the value of the associated environment variable is used, if the environment variable does not exist in the environment the default value is used. The values are listed below.
Host Machine. An IP address or name resolvable to an IP address of the machine the ibi™ Patterns - Search Server is on.
Environment Variable: TIBCOPatternsServerHost
Default value: localhost
Host Port. The port number the ibi™ Patterns - Search Server is listening on. If the environment variable does not contain an integer string value it is ignored.
Environment Variable: TIBCOPatternsServerPort
Default value: 5051
Connection Pooling. The type of connection pooling to be used. The environment variable must have a value of: "common", "local" or "none". Other values are ignored.
Environment Variable: TIBCOPatternsConnectionPooling
Default value: common
Protocol Selection. Whether communications should use IPv4, IPv6, or defer the choice to network configuration. The environment variable must have a value of: "ipv4" or "ipv6" or "mixed". Other values are ignored.
Environment Variable: TIBCOPatternsConnectionProtocols
Default value: mixed, except on Windows Server 2003 (and Windows XP), where the default is ipv4.
Debug Logging. Whether all communications should be logged to standard error. These logs will be very large and verbose, they are only used for debugging. The environment variable must have a value of: "on" or "off". Other values are ignored.
Environment Variable: TIBCOPatternsConnectionDebug
Default value: off
None of the following methods should be called on an object that is being shared across multiple threads:
The recommended procedure is to create and initialize a NetricsConMgr object in the main thread, it may then be passed to other threads, which may use it to create NetricsServerInterface or NetricsTransaction objects, but once shared between threads the NetricsConMgr object should never be updated by calling any of the methods listed above.
|
inline |
Create a connection manager.
The settings are taken from the environment variables or default values as described above.
|
inline |
Create a new transaction connection.
This creates a new connection to the ibi™ Patterns - Search Server and associates it with a new explicit transaction. All operations made through the returned interface object that modify data on the ibi Patterns Server are associated with the transaction. This is the only means of creating explicit transactions through the .NET API.
An exception is thrown if a connection can't be established or a new transaction can't be created.
The interface object uses the connection settings of the connection manager object at the time it is created. Once created the interface object is separate from the connection manager object that created it. Changing settings in the connection manager object will not affect the settings in the interface object and vice versa.
|
inline |
Continue work on an existing explicit transaction.
This creates a new connection to the ibi™ Patterns - Search Server and associates it with an existing explicit transaction. All operations made through the returned interface object that modify data on the ibi Patterns Server are associated with the transaction.
The interface object uses the connection settings of the connection manager object at the time it is created. Once created the interface object is separate from the connection manager object that created it. Changing settings in the connection manager object will not affect the settings in the interface object and vice versa.
|
inlinestatic |
Ignores server-name mismatches in certificate validation.
This is the ibi™ Patterns - Search .NET API default certificate validator. It bypasses server-name validation. This is because hosts are often specified by IP Address or a host name alias such as 'localhost', instead of an internet-registered host name.
|
inline |
Get the current certificate-validation callback.
The validator is ignored if SSL is disabled.
the current certificate validator. The default is DefaultCertificateValidator.
A null return indicates the application has changed validation back to the .NET Framework default.
|
inline |
Return the current ibi™ Patterns - Search host machine.
summary>Set the ibi™ Patterns - Search host machine.
This changes the host machine for this connection manager. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created via this object.
|
inline |
summary>Set the port to use when connecting to the ibi™ Patterns - Search server.
This sets the port to use when connecting to the ibi™ Patterns - Search Server. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created via this object.
port | the port number to use when connecting. |
|
inline |
Returns
SSL is disabled by default.
|
inline |
Create a new connection.
This creates a new connection to the ibi™ Patterns - Search Server. All operations made through the returned interface object that modify data on the ibi Patterns Server are associated with separate implicit transactions that are automatically committed or aborted when each operation returns.
An exception is thrown if a connection can't be established.
The interface object uses the connection settings of the connection manager object at the time it is created. Once created the interface object is separate from the connection manager object that created it. Changing settings in the connection manager object will not affect the settings in the interface object and vice versa.
|
inline |
Sets the certificate-validation callback.
The default is DefaultCertificateValidator. A custom certificate validator is needed only in unusual circumstances. For example if a self-signed certificate is in use.
A sample custom certificate validator for self-signed certificates:
certValidator | The callback used to filter validation. |
|
inline |
Set connection pooling to common mode.
This causes any new NetricsServerInterface or NetricsTransaction objects created to use common connection pooling. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created.
When common connection pooling is used the interface object will use a pool of connections that is shared with other interface objects using common connection pooling. This mode minimizes the number of new connections that are made to the server.
|
inline |
Set connection pooling to local mode.
This causes any new NetricsServerInterface or NetricsTransaction objects created to use local connection pooling. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created.
When local connection pooling is used the interface object keeps its own pool of connections. It will not share connections with other interface objects.
|
inline |
Turn off connection pooling.
This causes any new NetricsServerInterface or NetricsTransaction objects created to not use connection pooling. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created.
With connection pooling off every command will establish a new connection to the server. The connection will be dropped when the command completes.
|
inline |
Set debug logging off.
This causes any new NetricsServerInterface or NetricsTransaction objects created to have their connection debug logging turned off. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created.
Off is the default setting for debug logging.
|
inline |
Set debug logging on.
This causes any new NetricsServerInterface or NetricsTransaction objects created to have their connection debug logging turned on. This doesn't affect NetricsServerInterface or NetricsTransactions objects already created.
Debug logging is generated to the standard error and is very verbose. It should only be used for debugging specific problems.
|
inline |
summary>This returns the current ibi™ Patterns - Search listen port.
|
inline |
Set the network protocols that will be used to connect to the ibi™ Patterns - Search Server.
protocols | Which protocols to use. |
*/
|
inline |
Sets the SSL enable flag.
SSL is disabled by default.
enable | Pass true to enable SSL, false to disable. |