TIBCO EMS .NET API 8.6
TIBCO EMS .NET API 8.6
|
Administered object for creating server connections. More...
Public Member Functions | |
Connection | CreateConnection () |
Create a connection More... | |
Connection | CreateConnection (string userName, string password) |
Create a connection object with the given user name and password. More... | |
ConnectionFactory () | |
Construct an empty ConnectionFactory More... | |
ConnectionFactory (string serverUrl) | |
Construct a ConnectionFactory given server url More... | |
ConnectionFactory (string serverUrl, string clientId) | |
Construct a ConnectionFactory given the server url, and client id More... | |
ConnectionFactory (string serverUrl, string clientId, Hashtable properties) | |
Construct a ConnectionFactory given server url, client id and properties More... | |
override Object | Clone () |
Overrides the cloning process More... | |
void | SetServerUrl (String serverUrl) |
set the server url. More... | |
void | SetClientID (String clientID) |
Set the client id More... | |
void | SetMetric (int metric) |
Set the load balance metric More... | |
void | SetConnAttemptCount (int attempts) |
Set the number of connection attempts More... | |
void | SetConnAttemptDelay (int delay) |
Set delay between connection attempts More... | |
void | SetReconnAttemptCount (int attempts) |
Set number of reconnect attempts More... | |
void | SetReconnAttemptDelay (int delay) |
Set delay between reconnect attempts More... | |
void | SetUserName (String username) |
Set user name More... | |
void | SetUserPassword (String password) |
Set user password More... | |
void | SetConnAttemptTimeout (int timeout) |
Set the Connect Attempt timeout for a given connection. More... | |
void | SetReconnAttemptTimeout (int timeout) |
Set the Reconnect Attempt timeout for a given connection. More... | |
void | SetMulticastEnabled (bool enabled) |
Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast. More... | |
void | SetMulticastDaemon (string port) |
Set the port on which the client will connect to the multicast daemon. More... | |
void | SetSSLTrace (bool trace) |
Enable or disable tracing on the client side. More... | |
void | SetSSLAuthOnly (bool authOnly) |
Enable or disable encryption/decryption of the message data over the SSL connection More... | |
void | SetTargetHostName (String targetHostName) |
Set the name of the target EMS server. More... | |
void | SetCertificateStoreType (EMSSSLStoreType type, Object storeInfo) |
Set the certificate store type and info. More... | |
Object | GetCertificateStore () |
Get the certificate store info object associated with this connection factory. More... | |
void | SetHostNameVerifier (EMSSSLHostNameVerifier verifier) |
Set the custom host name verifier. Set to null to remove custom host name verifier. More... | |
void | SetClientTracer (System.IO.StreamWriter tracer) |
Set client tracer to given output stream. More... | |
void | SetSSLProxy (String host, int port) |
Set the connection factory's parameters for connecting through an SSL proxy. More... | |
void | SetSSLProxyAuth (String username, String password) |
Set a connection factory's username and password for connecting through an SSL proxy. More... | |
String | GetSSLProxyHost () |
Get the SSL proxy host from this connection factory. More... | |
int | GetSSLProxyPort () |
Get the SSL proxy port from this connection factory. More... | |
String | GetSSLProxyUser () |
Get the SSL proxy username from a connection factory. More... | |
String | GetSSLProxyPassword () |
Get the SSL proxy password from a connection factory. More... | |
Protected Member Functions | |
ConnectionFactory (SerializationInfo info, StreamingContext context) | |
ISerializable constructor More... | |
Administered object for creating server connections.
Connection factories are administered objects. They support concurrent use.
Administrators define connection factories in a repository. Each connection factory has administrative parameters that guide the creation of server connections. Usage follows either of two models:
EMS Server
You can use the EMS server as a name service provider - one tibemsd process provides both the name repository and the message service. Administrators define factories in the name repository. Client programs create connection factory objects with the URL of the repository, and call the CreateConnection() method. This method automatically accesses the corresponding factory in the repository, and uses it to create a connection to the message service.
Separate JNDI Repository
Administrators define factories in a JNDI repository. Client programs call LookupContext.Lookup to retrieve factories and use them to create connections to the server.
Administered Objects
Administered objects let administrators configure EMS behavior at the enterprise level. Administrators define these objects, and client programs use them. This arrangement relieves program developers and end users of the responsibility for correct configuration.
|
inlineprotected |
ISerializable constructor
|
inline |
Construct an empty ConnectionFactory
When administrators define factories in the EMS server, these constructors automatically access the corresponding objects in the repository.
|
inline |
Construct a ConnectionFactory given server url
When administrators define factories in the EMS server, these constructors automatically access the corresponding objects in the repository.
Reconnect and Fault Tolerance
To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL (for example, tcp://localhost:7222,tcp://localhost:7222)
serverUrl | The constructor contacts the EMS server at this URL, to access a factory. If connecting a fault-tolerant client, specify two or more comma-separated URLs, as described below in Reconnect and Fault Tolerance. |
|
inline |
Construct a ConnectionFactory given the server url, and client id
When administrators define factories in the EMS server, these constructors automatically access the corresponding objects in the repository.
Reconnect and Fault Tolerance
To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL (for example, tcp://localhost:7222,tcp://localhost:7222)
serverUrl | The constructor contacts the EMS server at this URL, to access a factory. If connecting a fault-tolerant client, specify two or more comma-separated URLs, as described below in Reconnect and Fault Tolerance. |
clientId | The id of the client. |
A client ID string lets the server associate a client-specific factory with each client program. When present, the server supplies that factory to the client. If a factory does not yet exist for the client, the server creates one, and stores it for future use by that specific client.
|
inline |
Construct a ConnectionFactory given server url, client id and properties
When administrators define factories in the EMS server, these constructors automatically access the corresponding objects in the repository.
Reconnect and Fault Tolerance
To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL (for example, tcp://localhost:7222,tcp://localhost:7222)
serverUrl | The constructor contacts the EMS server at this URL, to access a factory. If connecting a fault-tolerant client, specify two or more comma-separated URLs, as described below in Reconnect and Fault Tolerance. |
clientId | The id of the client. |
A client ID string lets the server associate a client-specific factory with each client program. When present, the server supplies that factory to the client. If a factory does not yet exist for the client, the server creates one, and stores it for future use by that specific client.
properties | The properties of the client such as user name and password. |
When present, these properties govern the behavior of the connection objects that a client-specific factory creates. For a list of properties, see the Connection-Related Fields in the Tibems members.
|
inline |
Overrides the cloning process
ConnectionFactory
object
|
inline |
Create a connection
The connection object presents a default user identity. If the server configuration permits that user, then the call succeeds.
|
inline |
Create a connection object with the given user name and password.
userName | The connection object presents this user identity to the server. This parameter can be omitted if the server isn't authenticating or authorizing users. |
password | The connection object authenticates the user identity with this password. This parameter can be omitted if the server isn't authenticating or authorizing users. |
|
inline |
Get the certificate store info object associated with this connection factory.
can be null or of type EMSSSLFileStoreInfo or EMSSSLSystemStoreInfo. NOTE: SSL Connection factory objects that are looked up in JNDI have a certificate store info already created. This allows a user to get access to the certificate store object and set properties not present in the JNDI object. e.g. ssl password.
|
inline |
Get the SSL proxy host from this connection factory.
EMSException | if the protocol of the connection factory's URL is not SSL. |
|
inline |
Get the SSL proxy password from a connection factory.
EMSException | if the protocol of the connection factory's URL is not SSL. |
|
inline |
Get the SSL proxy port from this connection factory.
EMSException | if the protocol of the connection factory's URL is not SSL. |
|
inline |
Get the SSL proxy username from a connection factory.
EMSException | if the protocol of the connection factory's URL is not SSL. |
|
inline |
Set the certificate store type and info.
type | The type of certificate store. Can be either EMSSSL_STORE_TYPE_SYSTEM or EMSSSL_STORE_TYPE_FILE. See EMSSSLStoreType for details. |
storeInfo | If the store type is EMSSSL_STORE_TYPE_SYSTEM, then storeInfo must be an EMSSSLSystemStoreInfo object. If the store type is EMSSSL_STORE_TYPE_FILE, then storeInfo must be an EMSSSLFileStoreInfo object. |
|
inline |
Set the client id
clientID | The client id |
EMSException | The specified client id already exists |
|
inline |
Set client tracer to given output stream.
Client tracing prints loaded certificates and information about the SSL handshake errors and results.
tracer | The output stream to send the tracing information. Specify null as parameter to disable client tracing. |
|
inline |
Set the number of connection attempts
attempts | The number of connection attempts |
|
inline |
Set delay between connection attempts
delay | Time (in milliseconds) of the delay between connection attempts. |
|
inline |
Set the Connect Attempt timeout for a given connection.
This timeout is per url and per connect_attempt. For example, to specify two connect attempts for a given url, then for each attempt the client will wait for the period specified by the connect attempt timeout for the connection to be established. If no connection is established within that the specified timeframe, the client connection attempt is terminated.
timeout | The timeout, in milliseconds. The minimum value is 100 milliseconds. If a value of less than 100 milliseconds is specified, then the minimum value of 100 milliseconds is used. |
|
inline |
Set the custom host name verifier. Set to null to remove custom host name verifier.
verifier | Host name verifier. Set to null to remove custom host name verifier. See EMSSSLHostNameVerifier for details. |
|
inline |
Set the load balance metric
metric | The load balance metric |
EMSException | Invalid metric |
|
inline |
Set the port on which the client will connect to the multicast daemon.
A connection to the multicast daemon is required when multicast is enabled and a MessageConsumer is subscribed to a multicast-enabled topic. Setting the port with this method will override the default port supplied by the server.
port | the port on which the client will connect to the multicast daemon. |
|
inline |
Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
When enabled, MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast. The default is enabled.
enabled | true to enable multicast, false to disable multicast. |
|
inline |
Set number of reconnect attempts
attempts | The number of connection attempts |
|
inline |
Set delay between reconnect attempts
delay | Time (in milliseconds) of the delay between reconnect attempts |
|
inline |
Set the Reconnect Attempt timeout for a given connection.
This timeout is per url and per reconnect_attempt. For example, to specify two reconnect attempts for a given url, then for each attempt the client will wait for the period specified by the reconnect attempt timeout for the connection to be established. If no reconnection is established within that the specified timeframe, the reconnection attempt is terminated.
timeout | The timeout, in milliseconds. The minimum value is 100 milliseconds. If a value of less than 100 milliseconds is specified, then the minimum value of 100 milliseconds is used. |
|
inline |
set the server url.
The server URL is of the form:
For example:
The server URL for a fault-tolerant configuration is a string with multiple URL's that are comma separated.
For example:
serverUrl | The constructor contacts the EMS server at this URL, to access a factory. If connecting a fault-tolerant client, specify two or more comma-separated URLs, as described below in Reconnect and Fault Tolerance. |
EMSException | Url is already set or some other error. |
|
inline |
Enable or disable encryption/decryption of the message data over the SSL connection
For the client and server to require an SSL connection only to perform authentication, the ssl_auth_only parameter needs to be set on the server and AUTH_ONLY needs to be set by the client. Setting these flags on both the server and client side indicates that the SSL connection is only used to only perform authentication. Once authentication is complete, the client switches to a regular TCP connection to communicate with the server.
authOnly | Flag to indicate whether the connection should only authenticate.
|
|
inline |
Set the connection factory's parameters for connecting through an SSL proxy.
An SSL proxy lets an EMS application create an SSL connection to an EMS server, even though a firewall separates the application from the server. The proxy usually runs within the firewall's DMZ. A connection factory contacts the SSL proxy, requesting an SSL connection to the server. The proxy authenticates the application program, and mediates the initial SSL negotiation between application and server. After the SSL connection is established, the application and server use it to communicate directly with one another.
host | The connection factory establishes SSL communication through a web proxy at this host. Supply a simple hostname, a fully qualified hostname with domain name, or an IP address (dot notation). |
port | The connection factory establishes SSL communication through a web proxy on this port. |
EMSException | if the proxy host is null or empty, the port is zero or the protocol of the connection factory's URL is not SSL. |
|
inline |
Set a connection factory's username and password for connecting through an SSL proxy.
When a connection factory establishes an EMS server connection through an SSL proxy host, the proxy might first require authentication before facilitating a connection. When required, use this call to set that authentication data on the connection factory.
Note: This proxy authentication data is distinct from the server authentication data and from the SSL private key encryption password.
username | The connection factory authenticates itself to the SSL proxy using this username. |
password | The connection factory authenticates itself to the SSL proxy using this password. |
EMSException | if the protocol of the connection factory's URL is not SSL. |
|
inline |
Enable or disable tracing on the client side.
Tracing will show information during the SSL handshake and on messages received and sent by the SSL link.
trace | Flag to indicate whether tracing should be enabled for all connection created via this connection factory.
|
|
inline |
Set the name of the target EMS server.
This is a required parameter for all .NET SSL connections. Because System.Net.Security.SslStream requires a targetHost, this value is required and cannot be NULL.
targetHostName | The name of the server as defined in the server's certificate. Usually the server's HostName is specified as the CN in the server's certificate. |
|
inline |
Set user name
username | User name |
|
inline |
Set user password
password | User password |