TIBCO EMS .NET API 8.5
TIBCO EMS .NET API 8.5
|
Defines miscellaneous constants and provider properties used by TIBCO Enterprise Message Service More...
Static Public Member Functions | |
static int | GetMessageSize (Message msg) |
Returns the total wire size of the message which was received or sent More... | |
static int | GetMessageHeadersSize (Message msg) |
Returns the total wire size of the message headers for a message which was received or sent. More... | |
static int | GetMessagePropertiesSize (Message msg) |
Returns the total wire size of the message properties for a message which was received or sent. More... | |
static int | GetMessageBodySize (Message msg) |
Returns the total wire size of the message body for a message which was received or sent. More... | |
static int | CalculateMessageSize (Message msg) |
Calculates and returns total size of the message wire representation. More... | |
static void | SetAllowCloseInCallback (bool allow) |
Sets if the Session.Close, Connection.Close or Connection.Stop methods can be called in the IMessageListener.OnMessage callback. More... | |
static void | SetAllowCallbackInClose (bool allow) |
Deprecated, use Tibems.SetAllowCloseInCallback instead. More... | |
static bool | GetAllowCloseInCallback () |
Determine whether client callbacks may call close methods More... | |
static bool | GetAllowCallbackInClose () |
Deprecated, use Tibems.GetAllowCloseInCallback instead. More... | |
static void | SetExceptionOnFTSwitch (bool callExceptionListener) |
Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch. More... | |
static bool | GetExceptionOnFTSwitch () |
Return the fault tolerance exception setting More... | |
static void | SetExceptionOnFTEvents (bool callExceptionListener) |
Sets if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected. More... | |
static bool | GetExceptionOnFTEvents () |
Returns if exception listener is called on disconnect and reconnect attempts. More... | |
static void | SetSessionDispatcherDaemon (bool makeDaemon) |
Set the dispatcher thread setting More... | |
static bool | GetSessionDispatcherDaemon () |
Return the dispatcher thread setting. More... | |
static void | SetConnectAttempts (string specs) |
Modify the connection attempts setting determining the number of attempts the client makes to connect to the server. More... | |
static string | GetConnectAttempts () |
Returns the connect attempts setting. More... | |
static void | SetConnectAttemptTimeout (int timeout) |
Set the maximum amount of time a client will wait for the connection to be established More... | |
static int | GetConnectAttemptTimeout () |
Returns the connect attempt timeout value More... | |
static void | SetReconnectAttemptTimeout (int timeout) |
Sets the maximum amount of time a client will wait for the reconnect to complete More... | |
static int | GetReconnectAttemptTimeout () |
Returns the connect attempt timeout value More... | |
static void | SetReconnectAttempts (string specs) |
Sets the parameter for the number of attempts the connections make to reconnect to the backup server during fault-tolerant switch. More... | |
static String | GetReconnectAttempts () |
Returns the reconnect attempts setting. More... | |
static void | SetSocketReceiveBufferSize (int size) |
Set the size of socket receive buffers More... | |
static int | GetSocketReceiveBufferSize () |
Returns the size of socket receive buffer. More... | |
static void | SetSocketSendBufferSize (int size) |
Set the size of socket send buffers More... | |
static int | GetSocketSendBufferSize () |
Return the size of socket send buffer More... | |
static void | SetPingInterval (int seconds) |
Set the interval at which the client tests network connectivity More... | |
static int | GetPingInterval () |
Return the ping interval in seconds used by inactive connections More... | |
static object | GetProperty (string key) |
Retrieve the property value given the property name More... | |
static void | SetProperty (string key, object val) |
Modify a property value More... | |
static void | SetEncoding (String encodingName) |
Set global string encoding for messages More... | |
static string | GetEncoding () |
Return the name of the global string encoding for messages More... | |
static void | SetMessageEncoding (Message message, string encodingName) |
Set the character encoding for an individual message More... | |
static string | GetMessageEncoding (Message message) |
Return string encoding name set for this message More... | |
static byte[] | GetAsBytes (Message message) |
Return a copy of the message data as a byte array, suitable for archiving in a file More... | |
static Message | CreateFromBytes (byte[] bytes) |
Create a message from specified byte array More... | |
static void | MakeWriteable (Message message) |
Set message to writeable state without resetting its content. More... | |
static String | GetConnectionActiveURL (Connection connection) |
Return the URL of the EMS server for the specified connection. More... | |
static void | SetNPSendCheckMode (MessageProducer producer, int mode) |
Set the mode defining when a producer should check the result of sending a NON_PERSISTENT message. More... | |
static int | GetNPSendCheckMode (MessageProducer producer) |
Return the mode defining when a producer checks the result of sending a NON_PERSISTENT message. More... | |
static void | SetTraceFile (string fileName) |
Use this method to instruct the TIBCO EMS Client library to direct the tracing, that would normally go to stderr or stdout, to a file named fileName. More... | |
static void | SetMulticastEnabled (bool enabled) |
Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast. More... | |
static bool | GetMulticastEnabled () |
Get whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast. More... | |
static void | SetMulticastDaemon (string port) |
Set the port on which the EMS client will connect to the multicast daemon. More... | |
static string | GetMulticastDaemon () |
Get the port on which the EMS client will connect to the multicast daemon. More... | |
static bool | IsConsumerMulticast (MessageConsumer consumer) |
Checks if a MessageConsumer is receiving messages over multicast. More... | |
static void | RecoverMsg (Message msg) |
Recover a single message. More... | |
Public Attributes | |
const int | NPSEND_CHECK_DEFAULT = Const.NPSEND_MODE_DEFAULT |
Defines default check mode for sending a NON_PERSISTENT messages. See SetNPSendCheckMode. More... | |
const int | NPSEND_CHECK_ALWAYS = Const.NPSEND_MODE_ALWAYS |
Defines mode when producer always checks result of sending a NON_PERSISTENT message. See SetNPSendCheckMode. More... | |
const int | NPSEND_CHECK_NEVER = Const.NPSEND_MODE_NEVER |
Defines mode when producer never checks result of sending a NON_PERSISTENT message. See SetNPSendCheckMode. More... | |
const int | NPSEND_CHECK_TEMP_DEST = Const.NPSEND_MODE_TEMP |
Defines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination. See SetNPSendCheckMode. More... | |
const int | NPSEND_CHECK_AUTH = Const.NPSEND_MODE_AUTH |
Defines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled. See SetNPSendCheckMode. More... | |
const int | NPSEND_CHECK_TEMP_AUTH = Const.NPSEND_MODE_TEMP_AUTH |
Defines mode when producer checks result of sending a NON_PERSISTENT message when sending into temporary destination or if server authorization is enabled. See SetNPSendCheckMode. More... | |
const string | JMS_TIBCO_IMPORTED = "JMS_TIBCO_IMPORTED" |
Provider-specific message property which is set by the provider if the message has been imported from an external message service, such as TIBCO Rendezvous or TIBCO SmartSockets. More... | |
const string | JMS_TIBCO_SENDER = "JMS_TIBCO_SENDER" |
Provider-specific message property which may be set in a received message if message has been sent on a destination with sender name property. When set in the message, the property value is a String specifying the name of the user who sent this message. More... | |
const string | JMS_TIBCO_DISABLE_SENDER = "JMS_TIBCO_DISABLE_SENDER" |
Provider specific message property which may be set to prevent the server from including the user name into message when sending this message to consumers. More... | |
const string | JMS_TIBCO_SS_SENDER = "JMS_TIBCO_SS_SENDER" |
Provider-specific message property which is set if imported message has been published by TIBCO SmartSockets application. More... | |
const string | JMS_TIBCO_CM_PUBLISHER = "JMS_TIBCO_CM_PUBLISHER" |
Provider-specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. More... | |
const string | JMS_TIBCO_CM_SEQUENCE = "JMS_TIBCO_CM_SEQUENCE" |
Provider-specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. More... | |
const string | JMS_TIBCO_MSG_EXT = "JMS_TIBCO_MSG_EXT" |
Provider-specific message property which is set by the provider or the application when message extensions are used. More... | |
const string | JMS_TIBCO_MSG_TRACE = "JMS_TIBCO_MSG_TRACE" |
Provider-specific message property which is set by the provider or the application when message extensions are used. More... | |
const string | JMS_TIBCO_COMPRESS = "JMS_TIBCO_COMPRESS" |
Provider-specific message property which is set by the application if this message should be compressed before it is sent to the server. More... | |
const string | JMS_TIBCO_PRESERVE_UNDELIVERED = "JMS_TIBCO_PRESERVE_UNDELIVERED" |
Provider-specific message property which is set by the application if this message should be placed into special system queue in case it could not be delivered. More... | |
const string | PROP_MESSAGE_ENCODING = "tibco.tibjms.message.encoding" |
Defines the name of the System Property setting the global encoding name for String values in the message properties and data fields. More... | |
const string | PROP_SOCKET_RECEIVE = "tibco.tibjms.socket.receive" |
Defines the name of the provider property setting the size of the socket receive buffer size in kilobytes for client connections. More... | |
const string | PROP_SOCKET_SEND = "tibco.tibjms.socket.send" |
Defines the name of the provider property setting the size of the socket send buffer size in kilobytes for client connections. More... | |
const string | PROP_DAEMON_DISPATCHER = "tibco.tibjms.daemon.dispatcher" |
Defines the name of the provider property controlling the type of Session dispatcher threads More... | |
const string | PROP_FT_SWITCH_EXCEPTION = "tibco.tibjms.ft.switch.exception" |
Defines the name of the provider property controlling if ExceptionListener set on the Connection should be called during fault-tolerant switch. More... | |
const string | PROP_FT_EVENTS_EXCEPTION = "tibco.tibjms.ft.events.exception" |
Defines the name of the provider property controlling if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected. More... | |
const string | PROP_CLOSE_IN_CALLBACK = "tibco.tibjms.close.in.callback" |
Defines the name of the provider property controlling if the Session.Close, Connection.Close or Connection.Stop methods can be called in the IMessageListener.OnMessage callback. More... | |
const string | PROP_CONNECT_ATTEMPTS = "tibco.tibjms.connect.attempts" |
Defines the name of the provider property controlling the number of attempts the connections make to connect to the server. More... | |
const string | PROP_RECONNECT_ATTEMPTS = "tibco.tibjms.reconnect.attempts" |
Defines the name of the provider property controlling the number of attempt the connections make to reconnect to the backup server during the fault-tolerant switch. More... | |
const string | PROP_CONNECT_ATTEMPT_TIMEOUT = "tibco.tibjms.connect.attempt.timeout" |
Defines the name of the System Property controlling the maximum time for the connections to connect to the server. When too many clients connect to the same server, the server may not be able to accept all connections at the same time or may run out of system resources. This parameter specifies the amount of time a client is willing to wait for a connection to be established. Internally the client library will tear down any hung connections (either because of non-availability of system resources or some other EMS server problem) after this timeout. More... | |
const string | PROP_RECONNECT_ATTEMPT_TIMEOUT = "tibco.tibjms.reconnect.attempt.timeout" |
Defines the name of the System Property controlling the maximum time for connections to reconnect to the backup server during the fault-tolerant switch. This property is similar to PROP_CONNECT_ATTEMPTS_TIMEOUT. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more reconnect time to reconnect than the initial connect. The value of this property is an integer in milliseconds. This property is defined as String "tibco.tibjms.reconnect.attempt.timeout". More... | |
const string | PROP_MULTICAST_ENABLED = "tibco.tibjms.multicast.enabled" |
Defines the name of the System Property specifying whether multicast is enabled or disabled for this EMS client. This property is defined as String "tibco.tibjms.multicast.enabled". More... | |
const string | PROP_MULTICAST_DAEMON = "tibco.tibjms.multicast.daemon" |
Defines the name of the System Property specifying the port on which EMS clients will connect to the multicast daemon. This property is defined as String "tibco.tibjms.multicast.daemon". More... | |
const string | PROP_PING_INTERVAL = "tibco.tibjms.ping.interval" |
Defines the name of the System Property setting the ping interval for inactive connections. More... | |
const string | DEFAULT_FACTORY_USERNAME = "TIBCO.EMS.factory.username" |
Defines the name of the ConnectionFactory property specifying default user name set for Connections created by the factory More... | |
const string | DEFAULT_FACTORY_PASSWORD = "TIBCO.EMS.factory.password" |
Defines the name of the ConnectionFactory property specifying default user password set for Connections created by the factory More... | |
const string | FACTORY_LOAD_BALANCE_METRIC = "TIBCO.EMS.factory.metric" |
Defines the name of the ConnectionFactory property specifying the load balancing metric to be used by the factory. More... | |
const int | FACTORY_LOAD_BALANCE_METRIC_NONE = 0 |
Indicates that no load balancing metric has been set for the connection factory. More... | |
const int | FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS = 1 |
Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections. More... | |
const int | FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE = 2 |
Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the lowest total byte rate (input and output). More... | |
const String | FACTORY_CONNECT_ATTEMPT_COUNT = "TIBCO.EMS.connect.attemptcount" |
Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will go through its URL list until it establishes its first connection to an EMS server. More... | |
const String | FACTORY_CONNECT_ATTEMPT_DELAY = "TIBCO.EMS.connect.attemptdelay" |
Defines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establish its first connection to an EMS server. More... | |
const String | FACTORY_RECONNECT_ATTEMPT_COUNT = "TIBCO.EMS.reconnect.attemptcount" |
Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will try to re-establish a connection to an EMS server after losing previous connection. More... | |
const String | FACTORY_RECONNECT_ATTEMPT_DELAY = "TIBCO.EMS.reconnect.attemptdelay" |
Defines the name of the ConnectionFactory property specifying the interval between reconnection attempts. More... | |
const String | FACTORY_CONNECT_ATTEMPT_TIMEOUT = "TIBCO.EMS.connect.attempttimeout" |
Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be established to an EMS server More... | |
const String | FACTORY_RECONNECT_ATTEMPT_TIMEOUT = "TIBCO.EMS.reconnect.attempttimeout" |
Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be re-established to an EMS server More... | |
const String | FACTORY_MULTICAST_ENABLED = "TIBCO.EMS.multicast.enabled" |
Defines the name of the ConnectionFactory property specifying whether MessageConsumers subscribed to a multicast-enabled topic are to receive messages over multicast or unicast. More... | |
const String | FACTORY_MULTICAST_DAEMON = "TIBCO.EMS.multicast.daemon" |
Defines the name of the ConnectionFactory property specifying the port of the multicast daemon used by MessageConsumers subscribed to multicast-enabled topics. More... | |
Properties | |
static EMSMulticastExceptionHandler | MulticastExceptionHandler |
The multicast exception event handler More... | |
Defines miscellaneous constants and provider properties used by TIBCO Enterprise Message Service
This class also provides methods for getting the size of a Message
object and manipulating provider properties.
The static methods GetProperty and SetProperty can be use to override default properties by user
|
inlinestatic |
Calculates and returns total size of the message wire representation.
The total size includes headers, properties and body.
This method re-measures the message, and caches the results; contrast Tibems.GetMessageSize.
This method might consume process storage, and might involve disk I/O - with associated performance penalties.
This method always creates internally the actual wire format of the message regardless of the state of the message.
msg | Compute the size of this message. |
ArgumentException | if parameter is null or is a foreign message implementation. |
TIBCO.EMS.EMSException | if an error occurred while building message wire representation. |
|
inlinestatic |
Create a message from specified byte array
Specified byte array must be previously obtained using the GetAsBytes method. Created message is set to read-only state, use the MakeWriteable method to enable message modification without erasing its content.
bytes | The byte array representation of the message. This byte array must be the result of previously calling GetAsBytes. |
|
inlinestatic |
Deprecated, use Tibems.GetAllowCloseInCallback instead.
|
inlinestatic |
Determine whether client callbacks may call close methods
According to the JMS specification, Close methods (that is, MessageConsumer.Close, Session.Close, Connection.Close) cannot return while any message callbacks (that is, EMSMessageHandler, IMessageListener.OnMessage) are running. As a result, a message callback must not call a Close method, lest it cause a deadlock. The SetAllowCloseInCallback method explicitly overrides this JMS requirement, permitting callbacks to call Close without deadlock (that is, embedded Close calls do not wait for callbacks to return).
This method returns, if it is allowed to call Close in callbacks.
|
inlinestatic |
Return a copy of the message data as a byte array, suitable for archiving in a file
To reconstruct the message from bytes use method createFromBytes. Parameter must be an instance of TIBCO Enterprise Message Service Message object.
message | The source message with which to fill the byte array. |
|
inlinestatic |
Returns the connect attempts setting.
This setting governs all client Connection objects as they attempt to connect to the server. Its value is a string of the form attempts or attempts,delay
|
inlinestatic |
Returns the connect attempt timeout value
|
inlinestatic |
Return the URL of the EMS server for the specified connection.
connection | The connection to the EMS server. |
|
inlinestatic |
Return the name of the global string encoding for messages
Programs can override the global encoding for individual messages. When neither a global nor an individual message encoding has been set, then EMS encodes the strings of an outbound message using the default UTF-8 encoding.
This encoding applies to all strings in message bodies (names and values), and properties (names and values). It does not apply to header names or values. The methods BytesMessage.ReadUTF and BytesMessage.WriteUTF are exempt from global and individual encoding settings.
|
inlinestatic |
Returns if exception listener is called on disconnect and reconnect attempts.
|
inlinestatic |
Return the fault tolerance exception setting
This setting determines exception behavior when the client successfully switches to a different server (fault-tolerant failover).
|
inlinestatic |
Returns the total wire size of the message body for a message which was received or sent.
The size is implicitly measured and cached when an inbound message arrives at the client, and when the client sends an outbound message. If the client modifies a message, or creates a message but never sends it, then this method could yield an incorrect cached value. To explicitly force a new measurement and cache its results, call Tibems.CalculateMessageSize; then the method yields the correct value.
If the body of the message is compressed, this method returns the size of the compressed wire representation.
msg | The message for which to return the size of the message body. |
ArgumentException | if parameter is null or is a foreign message implementation. |
|
inlinestatic |
Return string encoding name set for this message
This encoding for an individual message overrides the global encoding. When neither a global nor an individual encoding has been set, then EMS encodes the strings of an outbound message using the default UTF-8 encoding.
This encoding applies to all strings in message bodies (names and values), and properties (names and values). It does not apply to header names nor values. The methods BytesMessage.ReadUTF and BytesMessage.WriteUTF are exempt from global and individual encoding settings.
message | Get the encoding for this message. |
|
inlinestatic |
Returns the total wire size of the message headers for a message which was received or sent.
The size is implicitly measured and cached when an inbound message arrives at the client, and when the client sends an outbound message. If the client modifies a message, or creates a message but never sends it, then this method could yield an incorrect cached value. To explicitly force a new measurement and cache its results, call Tibems.CalculateMessageSize; then the method yields the correct value.
msg | The message for which to return the size of the message headers. |
ArgumentException | if parameter is null or is a foreign message implementation. |
|
inlinestatic |
Returns the total wire size of the message properties for a message which was received or sent.
The size is implicitly measured and cached when an inbound message arrives at the client, and when the client sends an outbound message. If the client modifies a message, or creates a message but never sends it, then this method could yield an incorrect cached value. To explicitly force a new measurement and cache its results, call Tibems.CalculateMessageSize; then the method yields the correct value.
msg | The message for which to return the size of the message properties. |
ArgumentException | if parameter is null or is a foreign message implementation. |
|
inlinestatic |
Returns the total wire size of the message which was received or sent
GetMessageSize returns the total size of a message - that is, the number of bytes that traverse the network when the client sends the message. This total is slightly larger than the sum of its three constituent parts, because it includes additional control information. Furthermore, the server adds its own control information as well, so the size of message as measured by receivers is slightly larger than its size as measured by the sender.
The size is implicitly measured and cached when an inbound message arrives at the client, and when the client sends an outbound message. If the client modifies a message, or creates a message but never sends it, then this method could yield an incorrect cached value. To explicitly force a new measurement and cache its results, call Tibems.CalculateMessageSize; then the method yields the correct value.
msg | The message for which to return the size. |
ArgumentException | if parameter is null or is a foreign message implementation. |
|
inlinestatic |
Get the port on which the EMS client will connect to the multicast daemon.
|
inlinestatic |
Get whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
|
inlinestatic |
Return the mode defining when a producer checks the result of sending a NON_PERSISTENT
message.
This method returns the send check mode previously set by {SetNPSendCheckMode} method. Notice that if the returned value is {NPSEND_CHECK_DEFAULT} then the effective mode can be set by the server parameter applied to all producers.
producer | message producer, must not be null |
ArgumentException | if producer is null |
|
inlinestatic |
Return the ping interval in seconds used by inactive connections
Clients test network connectivity by sending ping requests to the server at regular intervals. This method returns that interval (in seconds). Zero is a special value that disables ping testing.
|
inlinestatic |
Retrieve the property value given the property name
The properties here refer to those explicitly set by calling SetProperty or system properties (e.g Tibems.PROP_PING_INTERVAL etc.) set by either calling the specific methods (e.g SetPingInterval) or system properties set via SetProperty.
You can supply any of the following constants:
The constants are defined as static fields of Tibems. The values of those constants are the actual property names.
In .NET, methods exist to get and set the properties. This method provides an alternate way to get property values, which is consistent with the EMS Java API (for easy porting to .NET).
NOTE: In case of system properties if the values are never set then the default values are returned.
key | Return the value associated with this property name. |
|
inlinestatic |
Returns the reconnect attempts setting.
This setting governs all client Connection objects as they attempt to reconnect to the server after a network disconnect. Its value is a string of the form attempts or attempts,delay:
This method returns the string argument to Tibems.SetReconnectAttempts, rather than the numeric value of the setting. If the client has not set a value, this method returns the null string.
|
inlinestatic |
Returns the connect attempt timeout value
|
inlinestatic |
Return the dispatcher thread setting.
When a program uses asynchronous message consumers (either message listeners or .NET message event handler delegates), EMS creates internal dispatcher threads for each Session that has at least one asynchronous message consumer. When this setting is true, those dispatcher threads are daemon threads; when false (the default) they are not daemon threads.
|
inlinestatic |
Returns the size of socket receive buffer.
When set, this value overrides the operating system's default for the size of receive buffers associated with sockets that the client uses for connections to the server. (Some operating systems do not allow you to override the default size.)
|
inlinestatic |
Return the size of socket send buffer
When set, this value overrides the operating system's default for the size of send buffers associated with sockets that the client uses for connections to the server. (Some operating systems do not allow you to override the default size.)
|
inlinestatic |
Checks if a MessageConsumer is receiving messages over multicast.
consumer | the MessageConsumer to check |
|
inlinestatic |
Set message to writeable state without resetting its content.
message | The message to become writeable. |
|
inlinestatic |
Recover a single message.
msg | the Message to recover |
|
inlinestatic |
Deprecated, use Tibems.SetAllowCloseInCallback instead.
|
inlinestatic |
Sets if the Session.Close, Connection.Close or Connection.Stop methods can be called in the IMessageListener.OnMessage callback.
According to the JMS 2.0 specification, calling any of these methods must trigger an IllegalStateException. If this property is set then the Close or the Stop method can be called inside the callback and it will not throw an exception and will proceed without waiting for the same callback to return. Note: This method replaces the deprecated method SetAllowCallbackInClose.
allow | When true, EMS overrides the JMS specification so client callbacks may call Close or Stop methods.When false (the default), EMS obeys the JMS specification. |
|
inlinestatic |
Modify the connection attempts setting determining the number of attempts the client makes to connect to the server.
When too many clients connect to the same server, the server may not be able to accept all connections at the same time. This parameter specifies the number of attempts and delay between the attempt the connections perform in order to connect to the server. The value of this parameter is a String in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds.
specs | Set the connect setting to these specifications. The value must be string of the form attempts or attempts,delay:
|
|
inlinestatic |
Set the maximum amount of time a client will wait for the connection to be established
When too many clients connect to the same server, the server may not be able to accept all connections at the same time or may run out of system resources. This method specifies the maxmimum amount of time a client is willing to wait for a connection to be established. Internally the client library will tear down any hung connections (either because of non-availability of system resources or some other EMS server problem) after the timeout period has elapsed.
timeout | Timeout value, in milliseconds. The minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then the minimum value of 100 milliseconds is used. Default value is 0 (no timeout). |
|
inlinestatic |
Set global string encoding for messages
Clients can override the global encoding for individual messages. When neither a global nor an individual message encoding has been set, then EMS encodes the strings of an outbound message using the default UTF-8 encoding.
This encoding applies to all strings in message body fields (names and values), and properties (names and values). It does not apply to message header fields. The methods BytesMessage.ReadUTF and BytesMessage.WriteUTF are exempt from global and individual encoding settings.
Note: The only encoding names that are supported by the .NET client are the ones defined by the .NET framework. Please refer to the .NET framework documentation for a complete list of the encoding names supported by the .NET framework.
encodingName | The name of the encoding (for example, "utf-8"). For a list of standard encoding names, see www.iana.org. |
EMSException | If the encoding is not supported. |
|
inlinestatic |
Sets if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected.
Similarly to Tibems.SetExceptionOnFTSwitch, if this method is called and if a Connection's ExceptionListener is set, (and the connection has FT urls), then all above events will trigger the call to the ExceptionListener.OnException callback with an EMSException which has the vendor error code (EMSException.ErrorCode) set to the String in the form:
where event is:
An application can recognize such calls by analyzing the error code in the passed EMSException and perform necessary actions. Notice that this method replaces the method Tibems.SetExceptionOnFTSwitch(), which means that if both are called, only one "reconnected" event will be passed to the ExceptionListener.OnException callback (the one described above). We recommend that if Tibems.SetExceptionOnFTSwitch() was formerly used, and the user wishes to capture all FT events, this new property be used instead and the ExceptionListener.OnException callback modified to handle these new vendor error codes.
Note: When the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
callExceptionListener | When true, the connection's ExceptionListener catches an EMSException, which contains the server url from which the client got disconnected from, the server url the client is attempting to reconnect to, and the server url to which the client has reconnected to. Each of these events triggers the call to the exception listener.When false, fault-tolerant events such as initial disconnection and further reconnect attempts do not trigger call to the exception listener. |
|
inlinestatic |
Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch.
This setting determines exception behavior when the client successfully switches to a different server (fault-tolerant failover).
When an application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with EMSException providing the information about fault-tolerant switch. If calling the Connection's ExceptionListener is set, it is called with the EMSException which has the vendor error code (EMSException.getErrorCode) set to the String in the form:
An application can recognize such calls by analyzing the error code in the passed EMSException and perform necessary actions. Notice that the ExceptionListener is called with the special EMSException only when fault-tolerant switch has been performed succesfully. In case the fault-tolerant switch has failed, the Connection's ExceptionListener will be called with regular EMSException (it will not have error code in the form 'FT-SWITCH: new-server-url') specifying that the connection to Server has been terminated. Notice that by default Connection's ExceptionListener is not called after a successfull fault-tolerant switch.
Note: When the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
callExceptionListener | When true, the connection's ExceptionListener catches an EMSException, which contains the name of the new server.When false, fault-tolerant failover does not trigger an exception in the client. |
|
inlinestatic |
Set the character encoding for an individual message
This encoding for an individual message overrides the global encoding. When neither a global nor an individual message encoding has been set, then EMS encodes the strings of an outbound message using the default UTF-8 encoding.
This encoding applies to all strings in message bodies (names and values), and properties (names and values). It does not apply to header names or values. The methods BytesMessage.ReadUTF and BytesMessage.WriteUTF are exempt from global and individual encoding settings.
message | Set the encoding for this message. |
encodingName | The name of the encoding (for example, "utf-8"). For a list of standard encoding names, see www.iana.org. |
EMSException | If the encoding is not supported |
|
inlinestatic |
Set the port on which the EMS 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 and the port specified on the connection factory.
port | the port of the multicast daemon |
|
inlinestatic |
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. Default value is enabled. |
|
inlinestatic |
Set the mode defining when a producer should check the result of sending a NON_PERSISTENT
message.
This mode only applies to messages sent using the MesssageDeliveryMode.NonPersistent
delivery mode and a non-transactional Session
; it does not apply to cases when a message was sent using MessageDeliveryMode.Persistent
or the {MessageDeliveryMode.ReliableDelivery} delivery mode or if the corresponding Session
is transactional. If the producer's send check mode is not set, it may execute the mode applied globally to all producers via the EMS server parameter. Setting any mode other than {NPSEND_CHECK_DEFAULT} unconditionally overrides the global setting defined by the server.
Normally, applications use the server's setting or configure producers with a specific send mode only once. However, if required, applications may choose to change this mode before sending every message.
When a producer does not check the result of sending a message, it will not know if any problem has occurred and the message was not processed by the server. If a producer checks the result of the send, the Send
method will receive the server's response to the send and throw the appropriate exception if any problem has occurred. However, this will reduce the producer's performance.
producer | message producer, must not be null |
mode | one of constants {NPSEND_CHECK_DEFAULT}, {NPSEND_CHECK_ALWAYS}, {NPSEND_CHECK_NEVER}, {NPSEND_CHECK_TEMP_DEST}, {NPSEND_CHECK_AUTH} or {NPSEND_CHECK_TEMP_AUTH} |
ArgumentException | if the producer is null or if the mode value is invalid. |
|
inlinestatic |
Set the interval at which the client tests network connectivity
Clients test network connectivity by sending ping requests to the server at regular intervals. This method sets that interval (in seconds). If your program calls this method, it must do so before creating its first Connection object; after creating that object, this call has no effect.
seconds | Ping at this interval (in seconds). |
Zero is a special value that disables ping testing.
|
inlinestatic |
Modify a property value
In .NET, methods exist to get and set the properties. SetProperty provides an alternate way to set property values, which is consistent with the EMS Java API (for easy porting to .NET).
You can supply any of the following constants:
The constants are defined as static fields of Tibems. The values of those constants are the actual property names.
key | Set the value associated with this property name. |
val | Set the property to this value. |
|
inlinestatic |
Sets the parameter for the number of attempts the connections make to reconnect to the backup server during fault-tolerant switch.
This parameter is similar to the parameter set by setConnectAttempts method. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more attempts to reconnect than the initial connect.
specs | Set the reconnect setting to these specifications. The value must be string of the form attempts or attempts,delay:
|
|
inlinestatic |
Sets the maximum amount of time a client will wait for the reconnect to complete
This method is similar to SetConnectAttemptTimeout. However, during the initial connect of the clients to the server, the time for each connect attempt is normally distributed and there are less chances of the server exceeding its maximum accept queue. During a fault-tolerant switch, all of the clients automatically try to reconnect to the backup server at approximately the same time. When the number of connections is large, it may require more reconnect time to reconnect than the initial connect.
timeout | Timeout value, in milliseconds. The minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then the minimum value of 100 milliseconds is used. Default value is 0 (no timeout). |
|
inlinestatic |
Set the dispatcher thread setting
This method sets if Session dispatcher threads should be daemon. Some operating systems may ignore this setting.
When a program uses asynchronous message consumers (either message listeners or .NET message event handler delegates), EMS creates internal dispatcher threads for each Session that has at least one asynchronous message consumer. By default session dispatcher threads are not set to be daemon threads.
makeDaemon |
|
|
inlinestatic |
Set the size of socket receive buffers
This value overrides the operating system's default for the size of receive buffers associated with sockets that the client uses for connections to the server.
Use this call before creating server connections. This call sets an override buffer size for new socket buffers; it does not change the size of existing socket buffers.
size | Sockets use receive buffers of this size (in kilobytes). |
|
inlinestatic |
Set the size of socket send buffers
This value overrides the operating system's default for the size of send buffers associated with sockets that the client uses for connections to the server.
Use this call before creating server connections. This call sets an override buffer size for new socket buffers; it does not change the size of existing socket buffers.
Sets the size of the socket send buffer size for client connections. Some operating systems may ignore this setting.
size | Sockets use send buffers of this size (in kilobytes). |
|
inlinestatic |
Use this method to instruct the TIBCO EMS Client library to direct the tracing, that would normally go to stderr or stdout, to a file named fileName.
This call alone does not generate tracing, that is, the tracing still needs to be enabled as usual: from the admin tool and/or with the ssl trace parameter in order to trace SSL connections' handshake.
The trace file is opened in append mode. An IOException will be thrown if the file can not be opened, and the tracing will be directed to stderr or stdout based on the connection's tracing setting (check the admin command set server client_trace
for more details).
Since there is only one trace file allowed, an InvalidOperationException will be thrown if this method is called with a non null file name after a trace file has already been set.
Pass null
to this method to instruct the TIBCO EMS Client library to stop directing tracing to the file. Normal tracing (stderr or stdout) will then resume.
fileName | the name of the TIBCO EMS Client trace file for this application, or null to stop directing tracing to the file. |
InvalidOperationException | if this method is called twice with a non null fileName. |
System.IO.IOException | if an error occurs while opening/creating the file. |
const string TIBCO.EMS.Tibems.DEFAULT_FACTORY_PASSWORD = "TIBCO.EMS.factory.password" |
Defines the name of the ConnectionFactory property specifying default user password set for Connections created by the factory
This property is defined as string "TIBCO.EMS.factory.password".
Defines the name of a ConnectionFactory property. That property specifies a default user password for the connections that the factory creates.
If the client does not supply a password, the connection factory object uses this password as a default when creating a connection. See also ConnectionFactory.CreateConnection.
const string TIBCO.EMS.Tibems.DEFAULT_FACTORY_USERNAME = "TIBCO.EMS.factory.username" |
Defines the name of the ConnectionFactory property specifying default user name set for Connections created by the factory
This property is defined as string "TIBCO.EMS.factory.username".
Defines the name of a ConnectionFactory property. That property specifies a default username for the connections that the factory creates.
If the client does not supply a username, the connection factory object uses this username as a default when creating a connection. See also ConnectionFactory.CreateConnection.
const String TIBCO.EMS.Tibems.FACTORY_CONNECT_ATTEMPT_COUNT = "TIBCO.EMS.connect.attemptcount" |
Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will go through its URL list until it establishes its first connection to an EMS server.
This property is defined as String "TIBCO.EMS.connect.attemptcount"
const String TIBCO.EMS.Tibems.FACTORY_CONNECT_ATTEMPT_DELAY = "TIBCO.EMS.connect.attemptdelay" |
Defines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establish its first connection to an EMS server.
This property is defined as String "TIBCO.EMS.connect.attemptdelay"
const String TIBCO.EMS.Tibems.FACTORY_CONNECT_ATTEMPT_TIMEOUT = "TIBCO.EMS.connect.attempttimeout" |
Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be established to an EMS server
This property is defined as String "TIBCO.EMS.connect.attempttimeout".
const string TIBCO.EMS.Tibems.FACTORY_LOAD_BALANCE_METRIC = "TIBCO.EMS.factory.metric" |
Defines the name of the ConnectionFactory property specifying the load balancing metric to be used by the factory.
This field defines the name of a provider-specific ConnectionFactory property that governs the assignment of client connections among a set of load-balanced servers.
The load balance metric can be accessed via ConnectionFactory.SetMetric property. The valid metrics are:
This property is defined as string "TIBCO.EMS.factory.metric".
const int TIBCO.EMS.Tibems.FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE = 2 |
Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the lowest total byte rate (input and output).
const int TIBCO.EMS.Tibems.FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS = 1 |
Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections.
const int TIBCO.EMS.Tibems.FACTORY_LOAD_BALANCE_METRIC_NONE = 0 |
Indicates that no load balancing metric has been set for the connection factory.
const String TIBCO.EMS.Tibems.FACTORY_MULTICAST_DAEMON = "TIBCO.EMS.multicast.daemon" |
Defines the name of the ConnectionFactory property specifying the port of the multicast daemon used by MessageConsumers subscribed to multicast-enabled topics.
This property is defined as String "TIBCO.EMS.multicast.daemon".
const String TIBCO.EMS.Tibems.FACTORY_MULTICAST_ENABLED = "TIBCO.EMS.multicast.enabled" |
Defines the name of the ConnectionFactory property specifying whether MessageConsumers subscribed to a multicast-enabled topic are to receive messages over multicast or unicast.
This property is defined as String "TIBCO.EMS.multicast.enabled".
const String TIBCO.EMS.Tibems.FACTORY_RECONNECT_ATTEMPT_COUNT = "TIBCO.EMS.reconnect.attemptcount" |
Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will try to re-establish a connection to an EMS server after losing previous connection.
This property is defined as String "TIBCO.EMS.reconnect.attemptcount".
const String TIBCO.EMS.Tibems.FACTORY_RECONNECT_ATTEMPT_DELAY = "TIBCO.EMS.reconnect.attemptdelay" |
Defines the name of the ConnectionFactory property specifying the interval between reconnection attempts.
This property is defined as String "TIBCO.EMS.reconnect.attemptdelay".
const String TIBCO.EMS.Tibems.FACTORY_RECONNECT_ATTEMPT_TIMEOUT = "TIBCO.EMS.reconnect.attempttimeout" |
Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be re-established to an EMS server
This property is defined as String "TIBCO.EMS.reconnect.attempttimeout".
const string TIBCO.EMS.Tibems.JMS_TIBCO_CM_PUBLISHER = "JMS_TIBCO_CM_PUBLISHER" |
Provider-specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.
Defines the name of a provider-specific message property. An imported message with that property is an RVCM message. The value of that property is the RVCM sender name.
This property is defined as string "JMS_TIBCO_CM_PUBLISHER".
const string TIBCO.EMS.Tibems.JMS_TIBCO_CM_SEQUENCE = "JMS_TIBCO_CM_SEQUENCE" |
Provider-specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.
Defines the name of a provider-specific message property. An imported message with that property is an RVCM message. The value of that property is the RVCM sequence number.
This property is defined as string "JMS_TIBCO_CM_SEQUENCE".
const string TIBCO.EMS.Tibems.JMS_TIBCO_COMPRESS = "JMS_TIBCO_COMPRESS" |
Provider-specific message property which is set by the application if this message should be compressed before it is sent to the server.
This property is defined as string "JMS_TIBCO_COMPRESS".
Note: EMS supports compression only when EMS is used with Microsoft .NET Framework 2.0.
const string TIBCO.EMS.Tibems.JMS_TIBCO_DISABLE_SENDER = "JMS_TIBCO_DISABLE_SENDER" |
Provider specific message property which may be set to prevent the server from including the user name into message when sending this message to consumers.
This property is ignored by the server if the destination is specified to enforce the inclusion of the user name. This property, if used, must be set to boolean value 'true' by the message producer before sending the message.
This property is defined as String "JMS_TIBCO_DISABLE_SENDER".
const string TIBCO.EMS.Tibems.JMS_TIBCO_IMPORTED = "JMS_TIBCO_IMPORTED" |
Provider-specific message property which is set by the provider if the message has been imported from an external message service, such as TIBCO Rendezvous or TIBCO SmartSockets.
This property is defined as string "JMS_TIBCO_IMPORTED".
const string TIBCO.EMS.Tibems.JMS_TIBCO_MSG_EXT = "JMS_TIBCO_MSG_EXT" |
Provider-specific message property which is set by the provider or the application when message extensions are used.
This Message extension allows inclusion of other MapMessage objects as well as arrays of primitive types as MapMessage field values.
This property is defined as string "JMS_TIBCO_MSG_EXT".
const string TIBCO.EMS.Tibems.JMS_TIBCO_MSG_TRACE = "JMS_TIBCO_MSG_TRACE" |
Provider-specific message property which is set by the provider or the application when message extensions are used.
This Message extension allows per message tracing to be enabled.
This property is defined as string "JMS_TIBCO_MSG_TRACE".
const string TIBCO.EMS.Tibems.JMS_TIBCO_PRESERVE_UNDELIVERED = "JMS_TIBCO_PRESERVE_UNDELIVERED" |
Provider-specific message property which is set by the application if this message should be placed into special system queue in case it could not be delivered.
This property is defined as string "JMS_TIBCO_PRESERVE_UNDELIVERED".
const string TIBCO.EMS.Tibems.JMS_TIBCO_SENDER = "JMS_TIBCO_SENDER" |
Provider-specific message property which may be set in a received message if message has been sent on a destination with sender name property. When set in the message, the property value is a String specifying the name of the user who sent this message.
This property is defined as String "JMS_TIBCO_SENDER".
const string TIBCO.EMS.Tibems.JMS_TIBCO_SS_SENDER = "JMS_TIBCO_SS_SENDER" |
Provider-specific message property which is set if imported message has been published by TIBCO SmartSockets application.
Property value is a String specifying the SmartSockets sender name.
This property is defined as String "JMS_TIBCO_SS_SENDER".
const int TIBCO.EMS.Tibems.NPSEND_CHECK_ALWAYS = Const.NPSEND_MODE_ALWAYS |
Defines mode when producer always checks result of sending a NON_PERSISTENT message. See SetNPSendCheckMode.
const int TIBCO.EMS.Tibems.NPSEND_CHECK_AUTH = Const.NPSEND_MODE_AUTH |
Defines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled. See SetNPSendCheckMode.
const int TIBCO.EMS.Tibems.NPSEND_CHECK_DEFAULT = Const.NPSEND_MODE_DEFAULT |
Defines default check mode for sending a NON_PERSISTENT messages. See SetNPSendCheckMode.
const int TIBCO.EMS.Tibems.NPSEND_CHECK_NEVER = Const.NPSEND_MODE_NEVER |
Defines mode when producer never checks result of sending a NON_PERSISTENT message. See SetNPSendCheckMode.
const int TIBCO.EMS.Tibems.NPSEND_CHECK_TEMP_AUTH = Const.NPSEND_MODE_TEMP_AUTH |
Defines mode when producer checks result of sending a NON_PERSISTENT message when sending into temporary destination or if server authorization is enabled. See SetNPSendCheckMode.
const int TIBCO.EMS.Tibems.NPSEND_CHECK_TEMP_DEST = Const.NPSEND_MODE_TEMP |
Defines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination. See SetNPSendCheckMode.
const string TIBCO.EMS.Tibems.PROP_CLOSE_IN_CALLBACK = "tibco.tibjms.close.in.callback" |
Defines the name of the provider property controlling if the Session.Close, Connection.Close or Connection.Stop methods can be called in the IMessageListener.OnMessage callback.
According to the JMS 2.0 specification, calling any of these methods must trigger an IllegalStateException. If this property is set then the Close or the Stop method can be called inside the callback and it will not throw an exception and will proceed without waiting for the same callback to return. This property is defined as string "tibco.tibjms.close.in.callback".
const string TIBCO.EMS.Tibems.PROP_CONNECT_ATTEMPT_TIMEOUT = "tibco.tibjms.connect.attempt.timeout" |
Defines the name of the System Property controlling the maximum time for the connections to connect to the server. When too many clients connect to the same server, the server may not be able to accept all connections at the same time or may run out of system resources. This parameter specifies the amount of time a client is willing to wait for a connection to be established. Internally the client library will tear down any hung connections (either because of non-availability of system resources or some other EMS server problem) after this timeout.
The value of this property in an integer and is in milliseconds. This property is defined as String "tibco.tibjms.connect.attempt.timeout".
const string TIBCO.EMS.Tibems.PROP_CONNECT_ATTEMPTS = "tibco.tibjms.connect.attempts" |
Defines the name of the provider property controlling the number of attempts the connections make to connect to the server.
When too many clients connect to the same server, the server may not be able to accept all connections at the same time. This parameter specifies the number of attempts and delay between the attempt the connections perform in order to connect to the server. The value of this property is a string in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "2,500".
This property is defined as string "tibco.tibjms.connect.attempts".
const string TIBCO.EMS.Tibems.PROP_DAEMON_DISPATCHER = "tibco.tibjms.daemon.dispatcher" |
Defines the name of the provider property controlling the type of Session dispatcher threads
When application uses message listeners, TIBCO Enterprise Message Serivce creates internal dispatcher threads for each Session which has at least one asynchronous message consumer. By default those dispatcher threads are not set to be daemon threads. If this provider property is defined then the Session dispatcher threads will be created as daemon threads.
This property is defined as string "tibco.tibjms.daemon.dispatcher".
const string TIBCO.EMS.Tibems.PROP_FT_EVENTS_EXCEPTION = "tibco.tibjms.ft.events.exception" |
Defines the name of the provider property controlling if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected.
Similarly to Tibems.PROP_FT_SWITCH_EXCEPTION, if this property is set and if a Connection's ExceptionListener is set, (and the connection has FT urls), then all above events will trigger the call to the ExceptionListener.OnException callback with an EMSException which has the vendor error code (EMSException.ErrorCode) set to the String in the form:
where event is:
An application can recognize such calls by analyzing the error code in the passed EMSException and perform necessary actions. Notice that this property replaces the property Tibems.PROP_FT_SWITCH_EXCEPTION, which means that if both are set, only one "reconnected" event will be passed to the ExceptionListener.OnException callback (the one described above). We recommend that if Tibems.PROP_FT_SWITCH_EXCEPTION was formerly used, and the user wishes to capture all FT events, this new property be used instead and the ExceptionListener.OnException callback modified to handle these new vendor error codes.
This property is defined as string "tibco.tibjms.ft.events.exception".
Note: When the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
const string TIBCO.EMS.Tibems.PROP_FT_SWITCH_EXCEPTION = "tibco.tibjms.ft.switch.exception" |
Defines the name of the provider property controlling if ExceptionListener set on the Connection should be called during fault-tolerant switch.
When an application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with EMSException providing the information about fault-tolerant switch. If this property is set, the Connection's ExceptionListener is called with the EMSException which has the vendor error code (EMSException.getErrorCode()) set to the string in the form: FT-SWITCH: <new-server-url>
An application can recognize such calls by analyzing the error code in the passed EMSException and perform necessary actions. Notice that the ExceptionListener is called with the special EMSException only when fault-tolerant switch has been performed succesfully. In case the fault-tolerant switch has failed, the Connection's ExceptionListener will be called with regular EMSException (it will not have error code in the form 'FT-SWITCH: <new-server-url>' specifying that the connection to Server has been terminated. Notice that if this property is not set then by default Connection's ExceptionListener is not called after a successfull fault-tolerant switch.
This property is defined as string "tibco.tibjms.ft.switch.exception". NOTE: when the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
const string TIBCO.EMS.Tibems.PROP_MESSAGE_ENCODING = "tibco.tibjms.message.encoding" |
Defines the name of the System Property setting the global encoding name for String values in the message properties and data fields.
This property is defined as String "tibco.tibjms.message.encoding".
const string TIBCO.EMS.Tibems.PROP_MULTICAST_DAEMON = "tibco.tibjms.multicast.daemon" |
Defines the name of the System Property specifying the port on which EMS clients will connect to the multicast daemon. This property is defined as String "tibco.tibjms.multicast.daemon".
const string TIBCO.EMS.Tibems.PROP_MULTICAST_ENABLED = "tibco.tibjms.multicast.enabled" |
Defines the name of the System Property specifying whether multicast is enabled or disabled for this EMS client. This property is defined as String "tibco.tibjms.multicast.enabled".
const string TIBCO.EMS.Tibems.PROP_PING_INTERVAL = "tibco.tibjms.ping.interval" |
Defines the name of the System Property setting the ping interval for inactive connections.
When a connection does not send nor receives any data, it may not be able to detect network failure in certain situations. To avoid this, inactive connections periodically send "ping" messages to the server. Default interval is 60 seconds. In some cases it may take several intervals to detect network failure. The value of this property is a string encoding the ping interval in seconds, e.g. "60". Zero value disables ping messages.
This property is defined as String "tibco.tibjms.ping.interval".
const string TIBCO.EMS.Tibems.PROP_RECONNECT_ATTEMPT_TIMEOUT = "tibco.tibjms.reconnect.attempt.timeout" |
Defines the name of the System Property controlling the maximum time for connections to reconnect to the backup server during the fault-tolerant switch. This property is similar to PROP_CONNECT_ATTEMPTS_TIMEOUT. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more reconnect time to reconnect than the initial connect. The value of this property is an integer in milliseconds. This property is defined as String "tibco.tibjms.reconnect.attempt.timeout".
const string TIBCO.EMS.Tibems.PROP_RECONNECT_ATTEMPTS = "tibco.tibjms.reconnect.attempts" |
Defines the name of the provider property controlling the number of attempt the connections make to reconnect to the backup server during the fault-tolerant switch.
This property is similar to PROP_CONNECT_ATTEMPTS. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more attempts to reconnect than the initial connect. The value of this property is a string in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "4,500".
This property is defined as string "tibco.tibjms.reconnect.attempts".
const string TIBCO.EMS.Tibems.PROP_SOCKET_RECEIVE = "tibco.tibjms.socket.receive" |
Defines the name of the provider property setting the size of the socket receive buffer size in kilobytes for client connections.
The value of this property is a string encoding the number of kilobytes, e.g. "256". Some operating systems may ignore this setting.
This property is defined as String "tibco.tibjms.socket.receive".
const string TIBCO.EMS.Tibems.PROP_SOCKET_SEND = "tibco.tibjms.socket.send" |
Defines the name of the provider property setting the size of the socket send buffer size in kilobytes for client connections.
The value of this property is a string encoding the number of kilobytes, e.g. "256". Some operating systems may ignore this setting.
This property is defined as String "tibco.tibjms.socket.send".
|
staticaddremove |
The multicast exception event handler
The client library raises an event if it detects a problem with EMS multicast. The program implements a handler delegate to processes it asynchronously and registers the delegate here.
Delegate declaration for multicast exception handler is as follows:
Example of using the exception event handler: