Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tibco.tibjms
Class Tibjms

    java.lang.Object
      com.tibco.tibjms.Tibjms

    public class Tibjms

extends java.lang.Object

Defines optional custom methods, constants and System Properties used by TIBCO Enterprise Message Service client.

Field Summary
`static java.lang.String` | `DEFAULT_FACTORY_PASSWORD` Defines the name of the ConnectionFactory property specifying default user password set for Connections created by the factory.
`static java.lang.String` | `DEFAULT_FACTORY_USERNAME` Defines the name of the ConnectionFactory property specifying default user name set for Connections created by the factory.
`static int` | `EXPLICIT_CLIENT_ACKNOWLEDGE` Defines explicit client acknowledge mode.
`static int` | `EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE` Defines explicit client acknowledge mode with dups_ok.
`static java.lang.String` | `FACTORY_CONNECT_ATTEMPT_COUNT` 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.
`static java.lang.String` | `FACTORY_CONNECT_ATTEMPT_DELAY` Defines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establishe its first connection to an EMS server.
`static java.lang.String` | `FACTORY_CONNECT_ATTEMPT_TIMEOUT` 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 "com.tibco.tibjms.connect.attempttimeout".
`static java.lang.String` | `FACTORY_LOAD_BALANCE_METRIC` Defines the name of the ConnectionFactory property specifying the metric to be used for load balancing by the factory.
`static int` | `FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE` 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).
`static int` | `FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS` Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections.
`static int` | `FACTORY_LOAD_BALANCE_METRIC_NONE` Indicates that no load balancing metric has been set for the connection factory.
`static java.lang.String` | `FACTORY_MULTICAST_DAEMON` Defines the name of the ConnectionFactory property specifying the port of the multicast daemon used by MessageConsumers subscribed to multicast-enabled topics.
`static java.lang.String` | `FACTORY_MULTICAST_ENABLED` Defines the name of the ConnectionFactory property specifying whether MessageConsumers subscribed to a multicast-enabled topic are to receive messages over multicast.
`static java.lang.String` | `FACTORY_RECONNECT_ATTEMPT_COUNT` 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.
`static java.lang.String` | `FACTORY_RECONNECT_ATTEMPT_DELAY` Defines the name of the ConnectionFactory property specifying the interval between reconnection attempts.
`static java.lang.String` | `FACTORY_RECONNECT_ATTEMPT_TIMEOUT` 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 "com.tibco.tibjms.reconnect.attempttimeout".
`static java.lang.String` | `JMS_TIBCO_CM_PUBLISHER` Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.
`static java.lang.String` | `JMS_TIBCO_CM_SEQUENCE` Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.
`static java.lang.String` | `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.
`static java.lang.String` | `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.
`static java.lang.String` | `JMS_TIBCO_IMPORTED` Provider specific message property which is set by the provider if the message has been imported from TIBCO Rendezvous or TIBCO SmartSockets.
`static java.lang.String` | `JMS_TIBCO_MSG_EXT` Provider specific message property which is set by the provider or the application when message extensions are used.
`static java.lang.String` | `JMS_TIBCO_MSG_TRACE` Provider specific message property which can be set by the application if this message should be traced in the server and optionally in the client.
`static java.lang.String` | `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.
`static java.lang.String` | `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.
`static java.lang.String` | `JMS_TIBCO_SS_SENDER` Provider specific message property which is set if imported message has been published by TIBCO SmartSockets application.
`static int` | `NO_ACKNOWLEDGE` Defines no acknowledge acknowledge mode.
`static int` | `NPSEND_CHECK_ALWAYS` Defines mode when producer always checks result of sending a NON_PERSISTENT message.
`static int` | `NPSEND_CHECK_AUTH` Defines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled.
`static int` | `NPSEND_CHECK_DEFAULT` Defines default check mode for sending a NON_PERSISTENT messages.
`static int` | `NPSEND_CHECK_NEVER` Defines mode when producer never checks result of sending a NON_PERSISTENT message.
`static int` | `NPSEND_CHECK_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.
`static int` | `NPSEND_CHECK_TEMP_DEST` Defines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination.
`static java.lang.String` | `PROP_CLOSE_IN_CALLBACK` Defines the name of the System Property controlling if a MessageConsumer.close(), Session.close() or Connection.close() methods can be called in the MessageListener callback.
`static java.lang.String` | `PROP_CONNECT_ATTEMPT_TIMEOUT` Defines the name of the System Property controlling the maximum time for the connections to connect to the server.
`static java.lang.String` | `PROP_CONNECT_ATTEMPTS` Defines the name of the System Property controlling the number of attempts the connections make to connect to the server.
`static java.lang.String` | `PROP_DAEMON_DISPATCHER` Defines the name of the System Property controlling the type of Session dispatcher threads.
`static java.lang.String` | `PROP_FT_SWITCH_EXCEPTION` Defines the name of the System Property controlling if ExceptionListener set on the Connection should be called after fault-tolerant switch.
`static java.lang.String` | `PROP_MESSAGE_ENCODING` Defines the name of the System Property setting the global encoding name for String values in the message properties and data fields.
`static java.lang.String` | `PROP_MULTICAST_DAEMON` Defines the name of the System Property specifying the port on which EMS clients will connect to the multicast daemon.
`static java.lang.String` | `PROP_MULTICAST_ENABLED` Defines the name of the System Property specifying whether multicast is enabled or disabled for this EMS client.
`static java.lang.String` | `PROP_PING_INTERVAL` Defines the name of the System Property setting the ping interval for inactive connections.
`static java.lang.String` | `PROP_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.
`static java.lang.String` | `PROP_RECONNECT_ATTEMPTS` Defines the name of the System Property controlling the number of attempt the connections make to reconnect to the backup server during the fault-tolerant switch.
`static java.lang.String` | `PROP_SOCKET_CONNECT_TIMEOUT` Defines the name of the System Property controlling the low-level timeout of connecting the socket to the server.
`static java.lang.String` | `PROP_SOCKET_RECEIVE` Defines the name of the System Property setting the size of the socket receive buffer size in kilobytes for client connections.
`static java.lang.String` | `PROP_SOCKET_SEND` Defines the name of the System Property setting the size of the socket send buffer size in kilobytes for client connections.
`static java.lang.String` | `PROP_SSL_DEBUG_TRACE` Defines the name of the System Property specifying debug tracing for SSL connections using Entrust SSL Vendor.
`static java.lang.String` | `PROP_SSL_TRACE` Defines the name of the System Property specifying tracing for SSL connections.
`static java.lang.String` | `PROP_TRACE_FILE` Defines the name of the System Property specifying the trace file name to be used when client tracing is enabled. This property is defined as String "tibco.tibjms.trace.file".
`static int` | `RELIABLE_DELIVERY` Defines reliable delivery mode.

Method Summary
`static int` | `calculateMessageSize(Message msg)` Calculates and returns total size of the message wire representation.
`static Message` | `createFromBytes(byte[] bytes)` Create a message from specified byte array.
`static boolean` | `getAllowCallbackInClose()` Deprecated. This method has been misnamed and replaced by `getAllowCloseInCallback`.
`static boolean` | `getAllowCloseInCallback()` Returns if allowed to call close() in callbacks.
`static byte[]` | `getAsBytes(Message message)` Return a copy of the message data as a byte array, suitable for archiving in a file.
`static java.lang.String` | `getConnectAttempts()` Returns the connect attempts setting.
`static int` | `getConnectAttemptTimeout()` Returns the connect attempt timeout value
`static java.lang.String` | `getConnectionActiveURL(Connection connection)` Returns a string representing the URL of the server that this connection is currently connected to.
`static java.lang.String` | `getEncoding()` Retursn global string encoding for messages.
`static boolean` | `getExceptionOnFTSwitch()` Returns if exception listener is called on FT switch.
`static int` | `getMessageBodySize(Message msg)` Returns the total wire size of the message body for a message which was received or sent.
`static java.lang.String` | `getMessageEncoding(Message message)` Returns string encoding name set for this message.
`static int` | `getMessageHeadersSize(Message msg)` Returns the total wire size of the message headers for a message which was received or sent.
`static int` | `getMessagePropertiesSize(Message msg)` Returns the total wire size of the message properties for a message which was received or sent.
`static int` | `getMessageSize(Message msg)` Returns the total wire size of the message which was received or sent.
`static java.lang.String` | `getMulticastDaemon()` Get the port on which the EMS client will connect to the multicast daemon.
`static boolean` | `getMulticastEnabled()` Get whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
`static int` | `getNPSendCheckMode(MessageProducer producer)` Returns mode defining when a producer checks the result of sending a `NON_PERSISTENT` message.
`static int` | `getPingInterval()` Returns the ping interval in seconds used by inactive connections.
`static java.lang.String` | `getReconnectAttempts()` Returns the reconnect attempts setting.
`static int` | `getReconnectAttemptTimeout()` Returns the reconnect attempt timeout value
`static boolean` | `getSessionDispatcherDaemon()` Returns if session dispatcher threads are daemon.
`static long` | `getSocketConnectTimeout()` Returns the timeout in milliseconds used by low-level socket connect calls.
`static int` | `getSocketReceiveBufferSize()` Returns the size of socket receive buffer.
`static int` | `getSocketSendBufferSize()` Returns the size of socket send buffer.
`static boolean` | `isConsumerMulticast(MessageConsumer consumer)` Checks if a MessageConsumer is receiving messages over multicast.
`static void` | `makeWriteable(Message message)` Set message to writeable state without resetting its content.
`static void` | `setAllowCallbackInClose(boolean allow)` Deprecated. This method has been misnamed and replaced by `setAllowCloseInCallback`.
`static void` | `setAllowCloseInCallback(boolean allow)` Sets if MessageConsumer.close(), Session.close() or Connection.close() methods can be called in the MessageListener callback.
`static void` | `setConnectAttempts(java.lang.String specs)` Sets the parameters for the number of attempts the connections make to connect to the server.
`static void` | `setConnectAttemptTimeout(int timeout)` Sets the parameter for the maxmimum amount of time a client will wait for the connection to be established.
`static void` | `setEncoding(java.lang.String encodingName)` Set global string encoding for messages.
`static void` | `setExceptionOnFTSwitch(boolean callExceptionListener)` Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch.
`static void` | `setMessageEncoding(Message message, java.lang.String encodingName)` Set string encoding for message.
`static void` | `setMulticastDaemon(java.lang.String port)` Set the port on which the EMS client will connect to the multicast daemon.
`static void` | `setMulticastEnabled(boolean enabled)` Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
`static void` | `setMulticastExceptionListener(TibjmsMulticastExceptionListener listener)` Registers a TibjmsMulticastExceptionListener for handling multicast exceptions.
`static void` | `setNPSendCheckMode(MessageProducer producer, int mode)` Set mode defining when a producer should check the result of sending a `NON_PERSISTENT` message.
`static void` | `setPingInterval(int seconds)` Sets the ping interval in seconds used by inactive connections.
`static void` | `setReconnectAttempts(java.lang.String specs)` Sets the parameter for the number of attempts the connections make to reconnect to the backup server during fault-tolerant switch.
`static void` | `setReconnectAttemptTimeout(int timeout)` Sets the parameter for the maxmimum amount of time a client will wait for the reconnect to complete.
`static void` | `setSessionDispatcherDaemon(boolean makeDaemon)` Sets if Session dispatcher threads should be daemon.
`static void` | `setSocketConnectTimeout(long milliseconds)` Sets the timeout in milliseconds used by low-level socket connect calls.
`static void` | `setSocketReceiveBufferSize(int size)` Sets the size of the socket receive buffer size for client connections.
`static void` | `setSocketSendBufferSize(int size)` Sets the size of the socket send buffer size for client connections.
`static void` | `setTraceFile(java.lang.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`.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RELIABLE_DELIVERY

    public static final int RELIABLE_DELIVERY

  Defines reliable delivery mode. This delivery mode is a proprietary extension and when used offers increased performance of the message producers using this mode.
  This is defined as an integer value 22.

  See Also:
    Constant Field Values

### NO_ACKNOWLEDGE

    public static final int NO_ACKNOWLEDGE

  Defines no acknowledge acknowledge mode. This acknowledge mode is a proprietary extension and when used offers increased performance of the message consumers. Messages delivered to the sessions using this acknowledge mode do not require acknowledgement and are never redelivered regardless if the delivery has been successfull or not. This can only be used by Topic sessions but not by Queue sessions.
  This is defined as an integer value 22.

  See Also:
    Constant Field Values

### EXPLICIT_CLIENT_ACKNOWLEDGE

    public static final int EXPLICIT_CLIENT_ACKNOWLEDGE

  Defines explicit client acknowledge mode. This acknowledge mode is a proprietary extension. Sessions using this acknowledge mode must acknowledge each message explicitly calling the acknowledge() method for all messages. The application can call aknowledge() in any order. The general rule that acknowledging a message will acknowledge all previous messages does not apply.
  This is defined as an integer value 23.

  See Also:
    Constant Field Values

### EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE

    public static final int EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE

  Defines explicit client acknowledge mode with dups_ok. This acknowledge mode is a proprietary extension. This acknowledge mode implements the same explicit acknowledge logic as the EXPLICIT_CLIENT_ACKNOWLEDGE mode. However while EXPLICIT_CLIENT_ACKNOWLEDGE guarantees the success of the acknowledge operation upon return, this mode does not and, similarly to DUPS_OK_ACKNOWLEDGE mode, acknowledges message lazily with the possibility that some acknowledged messages may be redelivered. Like for EXPLICIT_CLIENT_ACKNOWLEDGE, this mode requires a JMS application to explicitly call acknowledge() method, in any order, for each message it wants to acknowledge.
  This is defined as an integer value 24.

  See Also:
    Constant Field Values

### NPSEND_CHECK_DEFAULT

    public static final int NPSEND_CHECK_DEFAULT

  Defines default check mode for sending a NON_PERSISTENT messages.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### NPSEND_CHECK_ALWAYS

    public static final int NPSEND_CHECK_ALWAYS

  Defines mode when producer always checks result of sending a NON_PERSISTENT message.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### NPSEND_CHECK_NEVER

    public static final int NPSEND_CHECK_NEVER

  Defines mode when producer never checks result of sending a NON_PERSISTENT message.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### NPSEND_CHECK_TEMP_DEST

    public static final int NPSEND_CHECK_TEMP_DEST

  Defines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### NPSEND_CHECK_AUTH

    public static final int NPSEND_CHECK_AUTH

  Defines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### NPSEND_CHECK_TEMP_AUTH

    public static final int NPSEND_CHECK_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.

  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### JMS_TIBCO_IMPORTED

    public static final java.lang.String JMS_TIBCO_IMPORTED

  Provider specific message property which is set by the provider if the message has been imported from TIBCO Rendezvous or TIBCO SmartSockets.
  This property is defined as String "JMS_TIBCO_IMPORTED".

  See Also:
    Constant Field Values

### JMS_TIBCO_SENDER

    public static final java.lang.String 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".

  See Also:
    Constant Field Values

### JMS_TIBCO_DISABLE_SENDER

    public static final java.lang.String 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".

  See Also:
    Constant Field Values

### JMS_TIBCO_SS_SENDER

    public static final java.lang.String 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".

  See Also:
    Constant Field Values

### JMS_TIBCO_CM_PUBLISHER

    public static final java.lang.String JMS_TIBCO_CM_PUBLISHER

  Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. When set in the imported message, the property value is a String specifying the CM publisher name.
  This property is defined as String "JMS_TIBCO_CM_PUBLISHER".

  See Also:
    Constant Field Values

### JMS_TIBCO_CM_SEQUENCE

    public static final java.lang.String JMS_TIBCO_CM_SEQUENCE

  Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. When set in the imported message, the property value is long number specifying the CM sequence number of the imported message.
  This property is defined as String "JMS_TIBCO_CM_SEQUENCE".

  See Also:
    Constant Field Values

### JMS_TIBCO_MSG_EXT

    public static final java.lang.String JMS_TIBCO_MSG_EXT

  Provider specific message property which is set by the provider or the application when message extensions are used. Message extensions allow to include StreamMessage and MapMessage objects as well as arrays of primitive types as values into StreamMessage and MapMessage messages.
  This property is defined as String "JMS_TIBCO_MSG_EXT".

  See Also:
    Constant Field Values

### JMS_TIBCO_MSG_TRACE

    public static final java.lang.String JMS_TIBCO_MSG_TRACE

  Provider specific message property which can be set by the application if this message should be traced in the server and optionally in the client. Value of this property can be an empty string or `null`, or a string "body" if message trace should print the message data fields.
  This property is defined as String "JMS_TIBCO_MSG_TRACE".

  See Also:
    Constant Field Values

### JMS_TIBCO_COMPRESS

    public static final java.lang.String 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".

  See Also:
    Constant Field Values

### JMS_TIBCO_PRESERVE_UNDELIVERED

    public static final java.lang.String 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".

  See Also:
    Constant Field Values

### PROP_MESSAGE_ENCODING

    public static final java.lang.String PROP_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.msg.encoding".

  See Also:
    Constant Field Values

### PROP_SOCKET_RECEIVE

    public static final java.lang.String PROP_SOCKET_RECEIVE

  Defines the name of the System 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".

  See Also:
    Constant Field Values

### PROP_SOCKET_SEND

    public static final java.lang.String PROP_SOCKET_SEND

  Defines the name of the System 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".

  See Also:
    Constant Field Values

### PROP_DAEMON_DISPATCHER

    public static final java.lang.String PROP_DAEMON_DISPATCHER

  Defines the name of the System Property controlling the type of Session dispatcher threads. When JMS application uses message listeners, TIBCO Enterprise Message Service client 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 system property is defined then the Session dispatcher threads will be created as daemon threads.
  This property is defined as String "tibco.tibjms.daemon.dispatcher".

  See Also:
    Constant Field Values

### PROP_FT_SWITCH_EXCEPTION

    public static final java.lang.String PROP_FT_SWITCH_EXCEPTION

  Defines the name of the System Property controlling if ExceptionListener set on the Connection should be called after fault-tolerant switch. When JMS application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with JMSException providing the information about fault-tolerant switch. If this property is set, the Connection's ExceptionListener is called with the JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:

      FT-SWITCH: <new-server-url>

  A JMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that the ExceptionListener is called with the special JMSException 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 JMSException (it will not have error code in the form 'FT-SWITCH: ') specifying that the connection to JMS 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.

  See Also:
    Constant Field Values

### PROP_CLOSE_IN_CALLBACK

    public static final java.lang.String PROP_CLOSE_IN_CALLBACK

  Defines the name of the System Property controlling if a MessageConsumer.close(), Session.close() or Connection.close() methods can be called in the MessageListener callback. According to the JMS specifications, calling any of those methods must wait for the MessageListener callback to return before the close() method can return to the calling application. Consequently, if the close() method is called inside the callback it causes a deadlock. If this property is set then the close() method can be called inside the callback and it will not wait for the same callback to return.
  This property is defined as String "tibco.tibjms.close.in.callback".

  See Also:
    Constant Field Values

### PROP_SOCKET_CONNECT_TIMEOUT

    public static final java.lang.String PROP_SOCKET_CONNECT_TIMEOUT

  Defines the name of the System Property controlling the low-level timeout of connecting the socket to the server. This only used with Java version 1.4.0 or higher. Default value used is "3000".
  This property is defined as String "tibco.tibjms.socket.connect.timeout".

  See Also:
    Constant Field Values

### PROP_CONNECT_ATTEMPTS

    public static final java.lang.String PROP_CONNECT_ATTEMPTS

  Defines the name of the System 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".

  See Also:
    Constant Field Values

### PROP_RECONNECT_ATTEMPTS

    public static final java.lang.String PROP_RECONNECT_ATTEMPTS

  Defines the name of the System 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".

  See Also:
    Constant Field Values

### PROP_PING_INTERVAL

    public static final java.lang.String PROP_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".

  See Also:
    Constant Field Values

### PROP_CONNECT_ATTEMPT_TIMEOUT

    public static final java.lang.String PROP_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-availiblity of system resources or some other EMS server problem) after this timeout. The value of this property in an integer and is in seconds. This property is defined as String "tibco.tibjms.connect.attempt.timeout".

  See Also:
    Constant Field Values

### PROP_RECONNECT_ATTEMPT_TIMEOUT

    public static final java.lang.String PROP_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 seconds. This property is defined as String "tibco.tibjms.reconnect.attempt.timeout".

  See Also:
    Constant Field Values

### PROP_SSL_TRACE

    public static final java.lang.String PROP_SSL_TRACE

  Defines the name of the System Property specifying tracing for SSL connections.
  This property is defined as String "tibco.tibjms.ssl.trace".

  See Also:
    Constant Field Values

### PROP_SSL_DEBUG_TRACE

    public static final java.lang.String PROP_SSL_DEBUG_TRACE

  Defines the name of the System Property specifying debug tracing for SSL connections using Entrust SSL Vendor.
  This property is defined as String "tibco.tibjms.ssl.debug.trace".

  See Also:
    Constant Field Values

### PROP_MULTICAST_ENABLED

    public static final java.lang.String PROP_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".

  See Also:
    Constant Field Values

### PROP_MULTICAST_DAEMON

    public static final java.lang.String PROP_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".

  See Also:
    Constant Field Values

### PROP_TRACE_FILE

    public static final java.lang.String PROP_TRACE_FILE

  Defines the name of the System Property specifying the trace file name to be used when client tracing is enabled.
  This property is defined as String "tibco.tibjms.trace.file".

  See Also:
    Constant Field Values

### DEFAULT_FACTORY_USERNAME

    public static final java.lang.String DEFAULT_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 "com.tibco.tibjms.factory.username".

  See Also:
    Constant Field Values

### DEFAULT_FACTORY_PASSWORD

    public static final java.lang.String DEFAULT_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 "com.tibco.tibjms.factory.password".

  See Also:
    Constant Field Values

### FACTORY_LOAD_BALANCE_METRIC

    public static final java.lang.String FACTORY_LOAD_BALANCE_METRIC

  Defines the name of the ConnectionFactory property specifying the metric to be used for load balancing by the factory.
  This property is defined as String "com.tibco.tibjms.factory.metric".

  See Also:
    Constant Field Values

### FACTORY_LOAD_BALANCE_METRIC_NONE

    public static final int FACTORY_LOAD_BALANCE_METRIC_NONE

  Indicates that no load balancing metric has been set for the connection factory.

  See Also:
    Constant Field Values

### FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS

    public static final int FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS

  Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections.

  See Also:
    Constant Field Values

### FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE

    public static final int FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE

  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).

  See Also:
    Constant Field Values

### FACTORY_CONNECT_ATTEMPT_COUNT

    public static final java.lang.String FACTORY_CONNECT_ATTEMPT_COUNT

  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 "com.tibco.tibjms.connect.attemptcount"

  See Also:
    Constant Field Values

### FACTORY_CONNECT_ATTEMPT_DELAY

    public static final java.lang.String FACTORY_CONNECT_ATTEMPT_DELAY

  Defines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establishe its first connection to an EMS server.
  This property is defined as String "com.tibco.tibjms.connect.attemptdelay"

  See Also:
    Constant Field Values

### FACTORY_CONNECT_ATTEMPT_TIMEOUT

    public static final java.lang.String FACTORY_CONNECT_ATTEMPT_TIMEOUT

  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 "com.tibco.tibjms.connect.attempttimeout".

  See Also:
    Constant Field Values

### FACTORY_RECONNECT_ATTEMPT_COUNT

    public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_COUNT

  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 "com.tibco.tibjms.reconnect.attemptcount".

  See Also:
    Constant Field Values

### FACTORY_RECONNECT_ATTEMPT_DELAY

    public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_DELAY

  Defines the name of the ConnectionFactory property specifying the interval between reconnection attempts.
  This property is defined as String "com.tibco.tibjms.reconnect.attemptdelay".

  See Also:
    Constant Field Values

### FACTORY_RECONNECT_ATTEMPT_TIMEOUT

    public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_TIMEOUT

  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 "com.tibco.tibjms.reconnect.attempttimeout".

  See Also:
    Constant Field Values

### FACTORY_MULTICAST_ENABLED

    public static final java.lang.String FACTORY_MULTICAST_ENABLED

  Defines the name of the ConnectionFactory property specifying whether MessageConsumers subscribed to a multicast-enabled topic are to receive messages over multicast.
  This property is defined as String "com.tibco.tibjms.multicast.enabled".

  See Also:
    Constant Field Values

### FACTORY_MULTICAST_DAEMON

    public static final java.lang.String FACTORY_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 "com.tibco.tibjms.multicast.daemon".

  See Also:
    Constant Field Values

Method Detail

### getMessageSize

    public static int getMessageSize(Message msg)

  Returns the total wire size of the message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method as well as getMessageBodySize and similar. Notice that total wire size of the message is the exact number of bytes sent over the network when an application sends the message. The total wire size of the message may be slightly greater than the summ of the wire size of message headers, properties and the body, due to extra control information encoded in the overal message wire representation. If the body of the message is compressed, this method returns the size of the wire representation using compressed body bytes. Notice that the server may add additional control information into the message before sending it to consumers. Thus the size of the received message is normally slightly bigger than the size of the same message when it was sent.

  Throws:
    `java.lang.IllegalArgumentException` - if parameter is null or is a foreign JMS message implementation.

### getMessageHeadersSize

    public static int getMessageHeadersSize(Message msg)

  Returns the total wire size of the message headers for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method.

  Throws:
    `java.lang.IllegalArgumentException` - if parameter is null or is a foreign JMS message implementation.

### getMessagePropertiesSize

    public static int getMessagePropertiesSize(Message msg)

  Returns the total wire size of the message properties for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method.

  Throws:
    `java.lang.IllegalArgumentException` - if parameter is null or is a foreign JMS message implementation.

### getMessageBodySize

    public static int getMessageBodySize(Message msg)

  Returns the total wire size of the message body for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method. If the body of the message is compressed, this method returns the size of the compressed wire representation.

  Throws:
    `java.lang.IllegalArgumentException` - if parameter is null or is a foreign JMS message implementation.

### calculateMessageSize

    public static int calculateMessageSize(Message msg)
                                    throws JMSException

  Calculates and returns total size of the message wire representation. This method always creates internally the actual wire format of the message regardless of the state of the message.

  Throws:
    `java.lang.IllegalArgumentException` - if parameter is null or is a foreign JMS message implementation.
    `JMSException` - if an error occurred while building message wire representation.

### setAllowCloseInCallback

    public static void setAllowCloseInCallback(boolean allow)

  Sets if MessageConsumer.close(), Session.close() or Connection.close() methods can be called in the MessageListener callback. According to the JMS specifications, calling any of those methods must wait for the MessageListener callback to return before the close() method can return to the calling application. Consequently, if the close() method is called inside the callback it causes a deadlock. If calling close() inside the callback is allowed, then close() method called inside the callback will not wait for the same callback to return.

### getAllowCloseInCallback

    public static boolean getAllowCloseInCallback()

  Returns if allowed to call close() in callbacks.

### setAllowCallbackInClose

    public static void setAllowCallbackInClose(boolean allow)

  Deprecated. This method has been misnamed and replaced by `setAllowCloseInCallback`.

### getAllowCallbackInClose

    public static boolean getAllowCallbackInClose()

  Deprecated. This method has been misnamed and replaced by `getAllowCloseInCallback`.

### setExceptionOnFTSwitch

    public static void setExceptionOnFTSwitch(boolean callExceptionListener)

  Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch. When JMS application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with JMSException providing the information about fault-tolerant switch. If calling the Connection's ExceptionListener is set, it is called with the JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:

      FT-SWITCH: <new-server-url>

  A JMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that the ExceptionListener is called with the special JMSException 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 JMSException (it will not have error code in the form 'FT-SWITCH: ') specifying that the connection to JMS 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.

### getExceptionOnFTSwitch

    public static boolean getExceptionOnFTSwitch()

  Returns if exception listener is called on FT switch.

### setSessionDispatcherDaemon

    public static void setSessionDispatcherDaemon(boolean makeDaemon)

  Sets if Session dispatcher threads should be daemon. When JMS application uses message listeners, TIBCO Enterprise Message Service client creates internal dispatcher threads for each Session which has at least one asynchronous message consumer. By default session dispatcher threads are not set to be daemon threads.

### getSessionDispatcherDaemon

    public static boolean getSessionDispatcherDaemon()

  Returns if session dispatcher threads are daemon.

### setConnectAttempts

    public static void setConnectAttempts(java.lang.String specs)

  Sets the parameters for 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 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. Default value used is "2,500".

### getConnectAttempts

    public static java.lang.String getConnectAttempts()

  Returns the connect attempts setting.

### setReconnectAttempts

    public static void setReconnectAttempts(java.lang.String specs)

  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. 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. Default value used is "4,500".

### getReconnectAttempts

    public static java.lang.String getReconnectAttempts()

  Returns the reconnect attempts setting.

### setConnectAttemptTimeout

    public static void setConnectAttemptTimeout(int timeout)

  Sets the parameter for the maxmimum amount of time a client will wait for the connection to be established. This timeout is in milliseconds 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-availiblity of system resources or some other EMS server problem) after this timeout. NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used. Default value is 0, i.e no timeout.

### getConnectAttemptTimeout

    public static int getConnectAttemptTimeout()

  Returns the connect attempt timeout value

### setReconnectAttemptTimeout

    public static void setReconnectAttemptTimeout(int timeout)

  Sets the parameter for the maxmimum amount of time a client will wait for the reconnect to complete. This timeout is in milliseconds This parameter is similar to setConnectAttemptTimoeut 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. NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used. Default value is 0, i.e no timeout.

### getReconnectAttemptTimeout

    public static int getReconnectAttemptTimeout()

  Returns the reconnect attempt timeout value

### setSocketReceiveBufferSize

    public static void setSocketReceiveBufferSize(int size)

  Sets the size of the socket receive buffer size for client connections. Some operating systems may ignore this setting.

### getSocketReceiveBufferSize

    public static int getSocketReceiveBufferSize()

  Returns the size of socket receive buffer.

### setSocketSendBufferSize

    public static void setSocketSendBufferSize(int size)

  Sets the size of the socket send buffer size for client connections. Some operating systems may ignore this setting.

### getSocketSendBufferSize

    public static int getSocketSendBufferSize()

  Returns the size of socket send buffer.

### setPingInterval

    public static void setPingInterval(int seconds)

  Sets the ping interval in seconds used by inactive connections. Zero value disables pinging inactive connections. This method, if necessary, should be called before the first connection is created by the application. Subsequent calls have no effect.

### getPingInterval

    public static int getPingInterval()

  Returns the ping interval in seconds used by inactive connections.

### setSocketConnectTimeout

    public static void setSocketConnectTimeout(long milliseconds)

  Sets the timeout in milliseconds used by low-level socket connect calls. This only used with Java version 1.4.0 or higher.

### getSocketConnectTimeout

    public static long getSocketConnectTimeout()

  Returns the timeout in milliseconds used by low-level socket connect calls. This only used with Java version 1.4.0 or higher.

### setEncoding

    public static void setEncoding(java.lang.String encodingName)
                            throws JMSException

  Set global string encoding for messages. Specified encoding will apply to all String values and names of properties and message fields but does not apply to message header fields and writeUTF method of BytesMessage.

  Throws:
    `JMSException`

### getEncoding

    public static java.lang.String getEncoding()

  Retursn global string encoding for messages. Returns null if encoding is not set. If global encoding is not set, encoding can be set for each message. Otherwise messages use default encoding UTF8 to encode strings in the wire representation of the message.

### setMessageEncoding

    public static void setMessageEncoding(Message message,
                                          java.lang.String encodingName)
                                   throws JMSException

  Set string encoding for message. This will override global encoding setting. Specified encoding will apply to all String values and names of properties and message fields but does not apply to message header fields and writeUTF method of BytesMessage.

  Throws:
    `JMSException`

### getMessageEncoding

    public static java.lang.String getMessageEncoding(Message message)

  Returns string encoding name set for this message. Returns null if no encoding was set, in that case message uses default encoding UTF8.

### getAsBytes

    public static byte[] getAsBytes(Message message)
                             throws JMSException

  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.

  Throws:
    `JMSException`

### createFromBytes

    public static Message createFromBytes(byte[] bytes)
                                   throws JMSException

  Create a message from specified byte array. Specified byte array must be previously obtained using method getAsBytes(). Created message is set to read-only state, use setWriteable method to enable message modification without erasing its content.

  Throws:
    `JMSException`

### makeWriteable

    public static void makeWriteable(Message message)
                              throws JMSException

  Set message to writeable state without resetting its content.

  Throws:
    `JMSException`

### getConnectionActiveURL

    public static java.lang.String getConnectionActiveURL(Connection connection)
                                                   throws JMSException

  Returns a string representing the URL of the server that this connection is currently connected to.

  Throws:
    `JMSException`

### setNPSendCheckMode

    public static void setNPSendCheckMode(MessageProducer producer,
                                          int mode)

  Set mode defining when a producer should check the result of sending a `NON_PERSISTENT` message.

  This mode only applies to messages sent using `javax.jms.DeliveryMode.NON_PERSISTENT` delivery mode using non-transactional `Session`, it does not apply to cases when message was sent using `javax.jms.DeliveryMode.PERSISTENT` or `RELIABLE_DELIVERY` delivery modes, or if the corresponding `Session` is transactional.

  If producer's send check mode is not set, it may execute the mode applied globally to all producers via EMS server parameter. Setting any mode other than `NPSEND_CHECK_DEFAULT` unconditionally overrides global setting defined by the server.

  Normally applications use server's setting or configure producers with specific send mode only once. However, if required, applications may choose to change this mode before sending every message.

  When 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 producer checks the result of the send, the `send` method will receive server's response to the send and throw appropriate exception if any problem has occured. However this will reduce producer's performance.

  Parameters:
    `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`
  Throws:
    `java.lang.IllegalArgumentException` - if producer is `null` or if mode value is invalid.
  Since:
    EMS 4.4
  See Also:
    `getNPSendCheckMode(javax.jms.MessageProducer)`

### getNPSendCheckMode

    public static int getNPSendCheckMode(MessageProducer producer)

  Returns mode defining when a producer checks the result of sending a `NON_PERSISTENT` message.

  This method returns send check mode previously set by `setNPSendCheckMode(javax.jms.MessageProducer, int)` method. Notice if returned value is `NPSEND_CHECK_DEFAULT` then effective mode can be set by the server parameter applied to all producers.

  Parameters:
    `producer` - message producer, must not be `null`
  Returns:
    one of constants `NPSEND_CHECK_DEFAULT`, `NPSEND_CHECK_ALWAYS`, `NPSEND_CHECK_NEVER`, `NPSEND_CHECK_TEMP_DEST`, `NPSEND_CHECK_AUTH` or `NPSEND_CHECK_TEMP_AUTH`
  Throws:
    `java.lang.IllegalArgumentException` - if producer is `null`
  Since:
    EMS 4.4
  See Also:
    `setNPSendCheckMode(javax.jms.MessageProducer, int)`

### setMulticastEnabled

    public static void setMulticastEnabled(boolean enabled)

  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.

  Parameters:
    `enabled` - `true` to enable multicast, `false` to disable multicast
  Since:
    EMS 5.0

### getMulticastEnabled

    public static boolean getMulticastEnabled()

  Get whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.

  Returns:
    `true` if multicast is enabled

### setMulticastDaemon

    public static void setMulticastDaemon(java.lang.String port)

  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.

  NOTE: setting the port with this method will override the default port supplied by the server and the port specified on the connection factory.

  Parameters:
    `port` - the port of the multicast daemon
  Since:
    EMS 5.0

### getMulticastDaemon

    public static java.lang.String getMulticastDaemon()

  Get the port on which the EMS client will connect to the multicast daemon.

  Returns:
    the port of the multicast daemon

### isConsumerMulticast

    public static boolean isConsumerMulticast(MessageConsumer consumer)

  Checks if a MessageConsumer is receiving messages over multicast.

  Parameters:
    `consumer` - the MessageConsumer to check
  Returns:
    `true` if MessageConsumer is receiving messages over multicast
  Throws:
    `java.lang.IllegalArgumentException` - if consumer is `null` or foreign.
  Since:
    EMS 5.0

### setMulticastExceptionListener

    public static void setMulticastExceptionListener(TibjmsMulticastExceptionListener listener)

  Registers a TibjmsMulticastExceptionListener for handling multicast exceptions.

  If a serious problem with EMS Multicast is detected, the MulticastExceptionListener is informed if one has been registered. It does this by calling the listener's onMulticastException method, passing it the affected MessageConsumer and a JMSException argument describing the problem.

  Parameters:
    `listener` - the URL of the multicast daemon
  Throws:
    `java.lang.IllegalArgumentException` - if listener is `null`.
  Since:
    EMS 5.0

### setTraceFile

    public static void setTraceFile(java.lang.String fileName)
                             throws java.io.IOException

  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 per JVM, an `IllegalStateException` 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.

  Parameters:
    `fileName` - the name of the TIBCO EMS Client trace file for this JVM, or `null` to stop directing tracing to the file.
  Throws:
    `java.io.IOException` - if an error occurs while opening/creating the file.
    `java.lang.IllegalStateException` - if this method is called twice with a non null fileName.
  Since:
    EMS 5.0

Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © TIBCO Software Inc. All rights reserved