SonicMQ API

progress.message.jclient
Class ConnectionFactory

java.lang.Object
  extended by progress.message.jclient.ConnectionFactory
All Implemented Interfaces:
java.io.Serializable, ConnectionFactory, javax.naming.Referenceable
Direct Known Subclasses:
QueueConnectionFactory, TopicConnectionFactory, XAConnectionFactory

public class ConnectionFactory
extends java.lang.Object
implements ConnectionFactory, javax.naming.Referenceable, java.io.Serializable

An implementation of a JMS ConnectionFactory. A client uses a ConnectionFactory to create Connections with a JMS Pub/Sub provider. This class provides all common methods for the subclasses, QueueConnectionFactory, TopicConnectionFactory, XAQueueConnectionFactory, and XATopicConnectionFactory.

Version:
2.0 - 12 Feb 2003
Author:
Tim Bemis
See Also:
QueueConnectionFactory, TopicConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory, Serialized Form

Field Summary
static java.lang.Integer ASYNCHRONOUS_DELIVERY_MODE_DEFAULT
          The default value for setAsynchronousDeliveryMode(Integer): specifies that the SonicMQ client runtime should make the decision whether or not to send messages asynchronously.
static java.lang.String CLIENT_TRANSACTION_BUFFER_SIZE
           
static java.lang.String COMPRESSION_FACTORY
           
static java.lang.String COMPRESSION_METRICS_LISTENER
           
static java.lang.Long DELIVERY_CLOSE_TIMEOUT_DEFAULT
          Default value for setDeliveryCloseTimeout(Long): do not wait for messages to be delivered on close.
static java.lang.Integer DELIVERY_DOUBT_WINDOW_DEFAULT
          Default value for setDeliveryDoubtWindow(Integer): no limit on the number of in doubt messages.
static java.lang.String ENABLE_COMPRESSION
           
static java.lang.String ENABLE_LOCAL_STORE
           
static java.lang.String FAULT_TOLERANT
           
static java.lang.String FAULT_TOLERANT_RECONNECT_TIMEOUT
           
static java.lang.String FLOW_TO_DISK
           
static java.lang.String HTTP
           
static java.lang.String INITIAL_CONNECT_TIMEOUT
           
static java.lang.String LG_DOWN_STREAM_NODE_TYPE
           
static java.lang.String LG_ENABLED
           
static java.lang.String LOCAL_STORE_DIRECTORY
           
static java.lang.String LOCAL_STORE_LISTENER_FACTORY_CLASS
           
static java.lang.String LOCAL_STORE_SIZE
           
static java.lang.String LOCAL_STORE_WAIT_TIME
           
static java.lang.String LOGIN_SPI_OBJECT
          This variable stores the Login SPI implementaion object into the env.
static java.lang.String MINIMIZE_SUBSCRIBER_TRAFFIC
           
static java.lang.String PING_INTERVAL
           
static java.lang.String RECONNECT_INTERVAL
           
static java.lang.String RECONNECT_TIMEOUT
           
static java.lang.String SOCKET_CONNECT_TIMEOUT
           
static java.lang.String SSL
           
static java.lang.String TCP
           
 
Constructor Summary
ConnectionFactory()
          Construct a ConnectionFactory with the default URL
ConnectionFactory(java.lang.String brokerURL)
          Construct a ConnectionFactory (with a default connectID, user and password of "").
ConnectionFactory(java.lang.String brokerHostName, int brokerPort, java.lang.String brokerProtocol, java.lang.String defaultUserName, java.lang.String defaultPassword)
          Construct a ConnectionFactory (with a default connectID of null).
ConnectionFactory(java.lang.String brokerHostName, int brokerPort, java.lang.String brokerProtocol, java.lang.String connectID, java.lang.String defaultUserName, java.lang.String defaultPassword)
          Construct a ConnectionFactory.
ConnectionFactory(java.lang.String brokerURL, java.lang.String connectID)
          Construct a ConnectionFactory (with a default user and password of "").
ConnectionFactory(java.lang.String brokerURL, java.lang.String defaultUserName, java.lang.String defaultPassword)
          Construct a ConnectionFactory (with a default connectID of null).
ConnectionFactory(java.lang.String brokerURL, java.lang.String connectID, java.lang.String defaultUserName, java.lang.String defaultPassword)
          Construct a ConnectionFactory.
 
Method Summary
 Connection createConnection()
          Creates a connection with the default user identity.
 Connection createConnection(java.lang.String userName, java.lang.String password)
          Creates a connection with the specified user identity.
 java.applet.Applet getApplet()
           
 java.lang.Integer getAsynchronousDeliveryMode()
          Gets whether or not messages sent by MessageProducers on a Connection's producers should be sent to the broker synchronously or asynchronously.
 java.lang.String getBrokerHostName()
           
 int getBrokerPort()
           
 java.lang.String getBrokerProtocol()
           
 java.lang.String getBrokerURL()
           
 java.lang.String getClientID()
           
 java.lang.Long getClientTransactionBufferSize()
          Get client transaction buffer size.
 java.lang.String getCompressionFactory()
          Queries the ConnectionFactory of the class name of the compression factory.
 java.lang.String getConnectID()
           
 java.lang.String getConnectionURLs()
          Return list of brokers to try to connect to.
 java.lang.String getDefaultPassword()
           
 int getDefaultTxnBatchSize()
          Gets the default batch size
 java.lang.Integer getDefaultTxnBatchSizeInteger()
          Gets the default batch size
 java.lang.String getDefaultUser()
           
 java.lang.Long getDeliveryCloseTimeout()
          The amount of time in milliseconds to wait on a per Session basis for unsent messages to be sent to the broker when a Session is closed.
 java.lang.Integer getDeliveryDoubtWindow()
          Gets the limit on the number of unacknowledged messages per Session when asynchronous message delivery is enabled.
 java.lang.Boolean getDurableMessageOrder()
          Determines whether the option to preserve message order when reconnecting a durable subscriber has been selected.
 boolean getEnableActionalInstrumentation()
          Queries the ConnectionFactory to see if the LG instrumentation is currently enabled.
 java.lang.Boolean getEnableActionalInstrumentationBoolean()
          Queries the ConnectionFactory to see if the LG instrumentation is currently enabled.
 boolean getEnableCompression()
          Queries the ConnectionFactory to see if compression is enabled.
 java.lang.Boolean getEnableCompressionBoolean()
          Queries the ConnectionFactory to see if compression is enabled.
 java.lang.Boolean getFaultTolerant()
          Determines whether fault tolerant connection creation is enabled.
 java.lang.Integer getFaultTolerantReconnectTimeout()
          Get fault tolerance reconnect timeout.
 java.lang.Integer getFlowToDisk()
          Determines the setting of Flow-To-Disk Publishing property.
 java.lang.Integer getInitialConnectTimeout()
          Get initial connect timeout for a fault-tolerant connection.
 java.lang.Integer getInitialRcvBufferSize()
          Gets the initial size of the buffer (in bytes) used when reading message traffic from the network transport.
 java.lang.Integer getInitialSendBufferSize()
          Gets the initial size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 int getLGDownStreamNodeType()
           
 boolean getLoadBalancing()
          Determines whether client-side load balancing is enabled.
 java.lang.Boolean getLoadBalancingBoolean()
          Determines whether client-side load balancing is enabled.
 java.lang.String getLoadBalancingClientData()
          Gets the additional information to be provided to the broker side load balancer to assist in making load balancing decisions.
 java.lang.String getLocalStoreDirectory()
          Gets the name of the directory where the local storage for the persistent client connection is located.
 long getLocalStoreSize()
          Get limit on how many messages can be stored locally on the persistent client while operating disconnected(offline).
 java.lang.Long getLocalStoreSizeLong()
          Get limit on how many messages can be stored locally on the persistent client while operating disconnected(offline).
 java.lang.Integer getLocalStoreWaitTime()
          Gets the limit (in seconds) on how long a sender send call waits before the message is written to the local store.
 java.lang.String getLoginSPI()
          Used to set the class name that implements ILogin interface.
 java.lang.Integer getMaxDeliveryCount()
          Gets the maximum number of times delivery of a message to a consumer should be attempted.
 java.lang.Integer getMaxRcvBufferSize()
          Gets the maximum size of the buffer (in bytes) used when reading message traffic from the network transport.
 java.lang.Integer getMaxSendBufferSize()
          Gets the maximum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 boolean getMinimizeSubscriberTraffic()
          Queries the ConnectionFactory to see if subscriber traffic is to be minimized.
 java.lang.Boolean getMinimizeSubscriberTrafficBoolean()
          Queries the ConnectionFactory to see if subscriber traffic is to be minimized.
 java.lang.Integer getMinRcvBufferSize()
          Gets the minimum size of the buffer (in bytes) used when reading message traffic from the network transport.
 java.lang.Integer getMinSendBufferSize()
          Gets the minimum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 java.lang.Integer getMonitorInterval()
          Gets the administrative flow control monitoring interval.
 boolean getPersistentDelivery()
          Determines whether the default of PERSISTENT delivery should be applied to publishers.
 java.lang.Boolean getPersistentDeliveryBoolean()
          Determines whether the default of PERSISTENT delivery should be applied to publishers.
 long getPingInterval()
          Get the connection ping interval.
 java.lang.Long getPingIntervalLong()
          Get the connection ping interval.
 int getPrefetchCount()
          Get the prefetch count for the QueueReceiver.
 java.lang.Integer getPrefetchCountInteger()
          Get the prefetch count for the QueueReceiver.
 int getPrefetchThreshold()
          Get the default prefetch threshold for the QueueReceiver.
 java.lang.Integer getPrefetchThresholdInteger()
          Get the prefetch threshold for the QueueReceiver.
 java.lang.Integer getQopCacheSize()
          Gets the number of destination<->QOP entries that are retained for Sessions that are derived from this factory.
 int getReconnectInterval()
          Applicable to persistent client connections only.
 java.lang.Integer getReconnectIntervalInteger()
          Applicable to persistent client connections only.
 int getReconnectTimeout()
          Applicable to persistent client connections only.
 java.lang.Integer getReconnectTimeoutInteger()
          Applicable to persistent client connections only.
 javax.naming.Reference getReference()
          Return a javax.naming.Reference object which contains the reference information necessary to create an object of the proper type.
 boolean getRequireActionalJMSNode()
          Queries if the JMS node should be reported by the LG upstream node, i.e., the broker.
 java.lang.Boolean getRequireActionalJMSNodeBoolean()
          Queries if the JMS node should be reported by the LG upstream node, i.e., the broker.
 java.lang.Boolean getRethrowCCRuntimeExceptions()
          Gets the value for determining whether to rethrow RuntimeExceptions encountered by a ConnectionConsumer's onMesssage().
 java.lang.Boolean getSelectorAtBroker()
           
 boolean getSequential()
          Determines whether the option to start with the first or a random element of the broker list has been selected.
 java.lang.Boolean getSequentialBoolean()
          Determines whether the option to start with the first or a random element of the broker list has been selected.
 java.lang.Integer getSocketConnectTimeout()
          Gets the setting of the socket connect timeout property.
 java.lang.Boolean getSplitMultiTopicDelivery()
          Gets the default value for splitting MultiTopic message delivery.
 java.lang.String getUrlsOrUrl()
          Return list of brokers to try to connect to.
 boolean isEnableLocalStore()
          Queries the ConnectionFactory to see if the LocalStore feature(persistent client feature) is currently enabled.
 java.lang.Boolean isEnableLocalStoreBoolean()
          Queries the ConnectionFactory to see if the LocalStore feature(persistent client feature) is currently enabled.
 void setApplet(java.applet.Applet applet)
           
 void setAsynchronousDeliveryMode(java.lang.Integer mode)
          Sets whether or not messages sent by MessageProducers on a connection's producers should be sent to the broker synchronously or asynchronously.
 void setBrokerHostName(java.lang.String brokerHostName)
           
 void setBrokerPort(int brokerPort)
           
 void setBrokerProtocol(java.lang.String brokerProtocol)
           
 void setBrokerURL(java.lang.String brokerURL)
           
 void setClientID(java.lang.String clientID)
           
 void setClientTransactionBufferSize(java.lang.Long size)
          Set client transaction buffer size.
 void setCompressionFactory(java.lang.String factory)
          Set the class name of the compression factory.
 void setConnectID(java.lang.String connectID)
           
 void setConnectionURLs(java.lang.String brokerList)
          Configures a list of brokers to try when creating a connection.
 void setDefaultPassword(java.lang.String password)
           
 void setDefaultTxnBatchSize(int size)
          Sets the default batch size of all sessions, created via connections created from this ConnectionFactory.
 void setDefaultTxnBatchSizeInteger(java.lang.Integer size)
          Sets the default batch size of all sessions, created via connections created from this ConnectionFactory.
 void setDefaultUser(java.lang.String username)
           
 void setDeliveryCloseTimeout(java.lang.Long timeout)
           The amount of time in milliseconds to wait on a per Session basis for unsent messages to be sent to the broker when a Session is closed.
 void setDeliveryDoubtWindow(java.lang.Integer numMessages)
          Sets the limit on the number of unacknowledged messages per Session when asynchronous message delivery is enabled.
 void setDurableMessageOrder(java.lang.Boolean durableSubscriberMessageOrder)
          Enable or disable preservation of message order for reconnecting durable subscribers.
 void setEnableActionalInstrumentation(boolean enabled)
          Set to indicate if the LG instrumentation is enabled locally.
 void setEnableActionalInstrumentationBoolean(java.lang.Boolean enabled)
          Set to indicate if the LG instrumentation is enabled locally.
 void setEnableCompression(boolean enabled)
          Set to indicate if compression should be enabled for the connections.
 void setEnableCompressionBoolean(java.lang.Boolean enabled)
          Set to indicate if compression should be enabled for the connections.
 void setEnableLocalStore(boolean value)
          Enable the LocalStore feature(persistent client feature).Enabling the persistent client provides a way for a client application to continue sending messages despite losing connection with the broker.
 void setEnableLocalStoreBoolean(java.lang.Boolean value)
          Enable the LocalStore feature(persistent client feature).Enabling the persistent client provides a way for a client application to continue sending messages despite losing connection with the broker.
 void setFaultTolerant(java.lang.Boolean faultTolerant)
          Enable or disable fault tolerant connection creation.
 void setFaultTolerantReconnectTimeout(java.lang.Integer seconds)
          Set fault tolerance reconnect timeout.
 void setFlowToDisk(java.lang.Integer flag)
          Enable or disable Flow-To-Disk Publishing.
 void setInitialConnectTimeout(java.lang.Integer seconds)
          Set initial connect timeout for a fault-tolerant connection.
 void setInitialRcvBufferSize(java.lang.Integer value)
          Sets the initial size of the buffer (in bytes) used when reading message traffic from the network transport.
 void setInitialSendBufferSize(java.lang.Integer value)
          Sets the initial size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 void setLGDownStreamNodeType(int peerType)
           
 void setLoadBalancing(boolean loadBalancing)
          Enable or disable client-side load balancing.
 void setLoadBalancingBoolean(java.lang.Boolean loadBalancing)
          Enable or disable client-side load balancing.
 void setLoadBalancingClientData(java.lang.String clientData)
          This can be set to provide additional information to assist the broker side load balancer when making load balancing decisions.
 void setLocalStoreDirectory(java.lang.String name)
          Sets the name of the directory where the local storage for the persistent client connection will be located.
 void setLocalStoreSize(long size)
          Sets limit on how many messages can be stored locally on the persistent client while operating disconnected(offline).
 void setLocalStoreSizeLong(java.lang.Long size)
          Sets limit on how many messages can be stored locally on the persistent client while operating disconnected(offline).
 void setLocalStoreWaitTime(java.lang.Integer secs)
          Sets the limit (in seconds) on how long a sender send call waits before the message is written to the local store.
 void setLoginSPI(java.lang.String className)
          Used to set the class name that implements ILogin interface.
 void setMaxDeliveryCount(java.lang.Integer value)
          Sets the maximum number of times delivery of a message to a consumer should be attempted.
 void setMaxRcvBufferSize(java.lang.Integer value)
          Sets the maximum size of the buffer (in bytes) used when reading message traffic from the network transport.
 void setMaxSendBufferSize(java.lang.Integer value)
          Sets the maximum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 void setMinimizeSubscriberTraffic(boolean minimizeTraffic)
          Set to minimizethe traffic for TopicSubscriber and DurableSubscriber.
 void setMinimizeSubscriberTrafficBoolean(java.lang.Boolean minimizeTraffic)
          Set to minimizethe traffic for TopicSubscriber and DurableSubscriber.
 void setMinRcvBufferSize(java.lang.Integer value)
          Sets the minimum size of the buffer (in bytes) used when reading message traffic from the network transport.
 void setMinSendBufferSize(java.lang.Integer value)
          Sets the minimum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.
 void setMonitorInterval(java.lang.Integer interval)
          Set the administrative flow control monitoring interval.
 void setPersistentDelivery(boolean persistentDelivery)
          Enable or disable persistent delivery.
 void setPersistentDeliveryBoolean(java.lang.Boolean persistentDelivery)
          Enable or disable persistent delivery.
 void setPingInterval(long interval)
          Enable/disable sending active pings on a connection.
 void setPingIntervalLong(java.lang.Long interval)
          Enable/disable sending active pings on a connection.
 void setPrefetchCount(int count)
          Set the prefetch count for the QueueReceiver.
 void setPrefetchCountInteger(java.lang.Integer count)
          Set the prefetch count for the QueueReceiver.
 void setPrefetchThreshold(int val)
          Set the default prefetch threshold for the QueueReceivers.
 void setPrefetchThresholdInteger(java.lang.Integer val)
          Set the default prefetch threshold for the QueueReceiver.
 void setQopCacheSize(java.lang.Integer value)
          Sets the number of destination<->QOP entries that are retained for Sessions that are derived from this factory.
 void setReconnectInterval(int secs)
          Applicable to persistent client connections only.
 void setReconnectIntervalInteger(java.lang.Integer secs)
          Applicable to persistent client connections only.
 void setReconnectTimeout(int minutes)
          Applicable to persistent client connections only.
 void setReconnectTimeoutInteger(java.lang.Integer minutes)
          Applicable to persistent client connections only.
 void setRequireActionalJMSNode(boolean required)
          Set to indicate if the JMS node should be reported by the LG upstream node, i.e., the broker.
 void setRequireActionalJMSNodeBoolean(java.lang.Boolean required)
          Set to indicate if the JMS node should be reported by the LG upstream node, i.e., the broker.
 void setRethrowCCRuntimeExceptions(java.lang.Boolean value)
          Sets the value for determining whether to rethrow RuntimeExceptions encountered by a ConnectionConsumer's onMesssage().
 void setSelectorAtBroker(java.lang.Boolean flag)
          If set to true, the message selector logic is performed at the JMS server (broker).
 void setSequential(boolean sequential)
          Specifies whether to start with the first broker in the list or a random element.
 void setSequentialBoolean(java.lang.Boolean sequential)
          Specifies whether to start with the first broker in the list or a random element.
 void setSocketConnectTimeout(java.lang.Integer value)
          Sets a timeout to be used when establishing a socket connection to the broker.
 void setSplitMultiTopicDelivery(java.lang.Boolean value)
          Sets the default value for splitting MultiTopic message delivery.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLE_LOCAL_STORE

public static final java.lang.String ENABLE_LOCAL_STORE
See Also:
Constant Field Values

LOCAL_STORE_DIRECTORY

public static final java.lang.String LOCAL_STORE_DIRECTORY
See Also:
Constant Field Values

LOCAL_STORE_SIZE

public static final java.lang.String LOCAL_STORE_SIZE
See Also:
Constant Field Values

LOCAL_STORE_WAIT_TIME

public static final java.lang.String LOCAL_STORE_WAIT_TIME
See Also:
Constant Field Values

RECONNECT_TIMEOUT

public static final java.lang.String RECONNECT_TIMEOUT
See Also:
Constant Field Values

RECONNECT_INTERVAL

public static final java.lang.String RECONNECT_INTERVAL
See Also:
Constant Field Values

LOCAL_STORE_LISTENER_FACTORY_CLASS

public static final java.lang.String LOCAL_STORE_LISTENER_FACTORY_CLASS
See Also:
Constant Field Values

PING_INTERVAL

public static final java.lang.String PING_INTERVAL
See Also:
Constant Field Values

FAULT_TOLERANT

public static final java.lang.String FAULT_TOLERANT
See Also:
Constant Field Values

FAULT_TOLERANT_RECONNECT_TIMEOUT

public static final java.lang.String FAULT_TOLERANT_RECONNECT_TIMEOUT
See Also:
Constant Field Values

INITIAL_CONNECT_TIMEOUT

public static final java.lang.String INITIAL_CONNECT_TIMEOUT
See Also:
Constant Field Values

CLIENT_TRANSACTION_BUFFER_SIZE

public static final java.lang.String CLIENT_TRANSACTION_BUFFER_SIZE
See Also:
Constant Field Values

FLOW_TO_DISK

public static final java.lang.String FLOW_TO_DISK
See Also:
Constant Field Values

SOCKET_CONNECT_TIMEOUT

public static final java.lang.String SOCKET_CONNECT_TIMEOUT
See Also:
Constant Field Values

LG_ENABLED

public static final java.lang.String LG_ENABLED
See Also:
Constant Field Values

LG_DOWN_STREAM_NODE_TYPE

public static final java.lang.String LG_DOWN_STREAM_NODE_TYPE
See Also:
Constant Field Values

ENABLE_COMPRESSION

public static final java.lang.String ENABLE_COMPRESSION
See Also:
Constant Field Values

COMPRESSION_FACTORY

public static final java.lang.String COMPRESSION_FACTORY
See Also:
Constant Field Values

COMPRESSION_METRICS_LISTENER

public static final java.lang.String COMPRESSION_METRICS_LISTENER
See Also:
Constant Field Values

MINIMIZE_SUBSCRIBER_TRAFFIC

public static final java.lang.String MINIMIZE_SUBSCRIBER_TRAFFIC
See Also:
Constant Field Values

TCP

public static final java.lang.String TCP
See Also:
Constant Field Values

HTTP

public static final java.lang.String HTTP
See Also:
Constant Field Values

SSL

public static final java.lang.String SSL
See Also:
Constant Field Values

LOGIN_SPI_OBJECT

public static final java.lang.String LOGIN_SPI_OBJECT
This variable stores the Login SPI implementaion object into the env.

See Also:
Constant Field Values

DELIVERY_CLOSE_TIMEOUT_DEFAULT

public static final java.lang.Long DELIVERY_CLOSE_TIMEOUT_DEFAULT
Default value for setDeliveryCloseTimeout(Long): do not wait for messages to be delivered on close.


DELIVERY_DOUBT_WINDOW_DEFAULT

public static final java.lang.Integer DELIVERY_DOUBT_WINDOW_DEFAULT
Default value for setDeliveryDoubtWindow(Integer): no limit on the number of in doubt messages.


ASYNCHRONOUS_DELIVERY_MODE_DEFAULT

public static final java.lang.Integer ASYNCHRONOUS_DELIVERY_MODE_DEFAULT
The default value for setAsynchronousDeliveryMode(Integer): specifies that the SonicMQ client runtime should make the decision whether or not to send messages asynchronously.

Constructor Detail

ConnectionFactory

public ConnectionFactory()
                  throws JMSException
Construct a ConnectionFactory with the default URL

Throws:
JMSException

ConnectionFactory

public ConnectionFactory(java.lang.String brokerURL)
                  throws JMSException
Construct a ConnectionFactory (with a default connectID, user and password of "").

Parameters:
brokerURL - the URL (in the form [protocol://]hostname[:port]) of the message broker to which connection are made.
Throws:
JMSException - if a connection factory can not be created.

ConnectionFactory

public ConnectionFactory(java.lang.String brokerURL,
                         java.lang.String connectID)
                  throws JMSException
Construct a ConnectionFactory (with a default user and password of "").

Parameters:
brokerURL - the URL (in the form [protocol://]hostname[:port]) of the message broker to which connection are made.
connectID - the id string used to identify connection. May be null.
Throws:
JMSException - if a connection factory can not be created.

ConnectionFactory

public ConnectionFactory(java.lang.String brokerURL,
                         java.lang.String defaultUserName,
                         java.lang.String defaultPassword)
                  throws JMSException
Construct a ConnectionFactory (with a default connectID of null).

Parameters:
brokerURL - the URL (in the form [protocol://]hostname[:port]) of the message broker to which connection are made.
defaultUserName - the default user name
defaultPassword - the default password
Throws:
JMSException - if a connection factory can not be created.

ConnectionFactory

public ConnectionFactory(java.lang.String brokerURL,
                         java.lang.String connectID,
                         java.lang.String defaultUserName,
                         java.lang.String defaultPassword)
                  throws JMSException
Construct a ConnectionFactory.

Parameters:
brokerURL - the URL (in the form [protocol://]hostname[:port]) of the message broker to which connection are made.
connectID - the id string used to identify connection. This may be null.
defaultUserName - the default user name
defaultPassword - the default password
Throws:
JMSException - if a connection factory can not be created.

ConnectionFactory

public ConnectionFactory(java.lang.String brokerHostName,
                         int brokerPort,
                         java.lang.String brokerProtocol,
                         java.lang.String defaultUserName,
                         java.lang.String defaultPassword)
                  throws JMSException
Construct a ConnectionFactory (with a default connectID of null).

Parameters:
brokerHostName - the broker host name,
brokerPort - the broker port number
brokerProtocol - the broker protocol, can be null or ""
defaultUserName - the default user name
defaultPassword - the default password
Throws:
JMSException - if a connection factory can not be created.

ConnectionFactory

public ConnectionFactory(java.lang.String brokerHostName,
                         int brokerPort,
                         java.lang.String brokerProtocol,
                         java.lang.String connectID,
                         java.lang.String defaultUserName,
                         java.lang.String defaultPassword)
                  throws JMSException
Construct a ConnectionFactory.

Parameters:
brokerHostName - the broker host name,
brokerPort - the broker port number
brokerProtocol - the broker protocol, can be null or ""
connectID - the id string used to identify connection. This may be null.
defaultUserName - the default user name
defaultPassword - the default password
Throws:
JMSException - if a connection factory can not be created.
Method Detail

setEnableLocalStore

public void setEnableLocalStore(boolean value)
Enable the LocalStore feature(persistent client feature).Enabling the persistent client provides a way for a client application to continue sending messages despite losing connection with the broker. Messages sent by the client are saved in a persistent store on the client system until connection is established at which time the accrued messages are sent.

Parameters:
value - the boolean value to enable/disable the feature
See Also:
isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

setEnableLocalStoreBoolean

public void setEnableLocalStoreBoolean(java.lang.Boolean value)
Enable the LocalStore feature(persistent client feature).Enabling the persistent client provides a way for a client application to continue sending messages despite losing connection with the broker. Messages sent by the client are saved in a persistent store on the client system until connection is established at which time the accrued messages are sent.

Parameters:
value - the Boolean value to enable/disable the feature
See Also:
isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

isEnableLocalStore

public boolean isEnableLocalStore()
Queries the ConnectionFactory to see if the LocalStore feature(persistent client feature) is currently enabled.

Returns:
boolean value of true if the feature is enabled.
See Also:
setEnableLocalStore(boolean), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

isEnableLocalStoreBoolean

public java.lang.Boolean isEnableLocalStoreBoolean()
Queries the ConnectionFactory to see if the LocalStore feature(persistent client feature) is currently enabled.

Returns:
Boolean value of true if the feature is enabled.
See Also:
setEnableLocalStoreBoolean(Boolean), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

setLocalStoreDirectory

public void setLocalStoreDirectory(java.lang.String name)
Sets the name of the directory where the local storage for the persistent client connection will be located. When you have multiple connections, use different directories to avoid unpredictable behaviors.

Parameters:
name - String value containing the name of the directory to use (default is the current working directory)
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

getLocalStoreDirectory

public java.lang.String getLocalStoreDirectory()
Gets the name of the directory where the local storage for the persistent client connection is located.

Returns:
client local storage location.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

setLocalStoreSize

public void setLocalStoreSize(long size)
Sets limit on how many messages can be stored locally on the persistent client while operating disconnected(offline). The default value is 10000 (10MB).

Parameters:
size - maximum size of the local store (in Kilobytes).
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

setLocalStoreSizeLong

public void setLocalStoreSizeLong(java.lang.Long size)
Sets limit on how many messages can be stored locally on the persistent client while operating disconnected(offline). The default value is 10000 (10MB).

Parameters:
size - maximum size of the local store (in Kilobytes).
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

getLocalStoreSize

public long getLocalStoreSize()
Get limit on how many messages can be stored locally on the persistent client while operating disconnected(offline). The default value is 10000 (10MB).

Returns:
maximum size of the local store (in Kilobytes) as a long.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

getLocalStoreSizeLong

public java.lang.Long getLocalStoreSizeLong()
Get limit on how many messages can be stored locally on the persistent client while operating disconnected(offline). The default value is 10000 (10MB).

Returns:
maximum size of the local store (in Kilobytes) as a Long.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), setLocalStoreWaitTime(Integer), getLocalStoreWaitTime()

setLocalStoreWaitTime

public void setLocalStoreWaitTime(java.lang.Integer secs)
Sets the limit (in seconds) on how long a sender send call waits before the message is written to the local store. The default is 0 (no limit).

Parameters:
secs - time to wait (in seconds)
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), getLocalStoreWaitTime()

getLocalStoreWaitTime

public java.lang.Integer getLocalStoreWaitTime()
Gets the limit (in seconds) on how long a sender send call waits before the message is written to the local store. The default is 0 (no limit).

Returns:
the wait time (in seconds) as an Integer.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger(), setLocalStoreWaitTime(Integer)

setReconnectTimeout

public void setReconnectTimeout(int minutes)
Applicable to persistent client connections only.

Sets how long (in minutes) the offline persistent client runtime attempts to make a connection to the broker. This parameter limits the amount of time a persistent client connection may be offline before an exception is be returned to the ExceptionListener. When offline, persistent client sends are saved in the local client storage. An offline persistent client periodically attempts to make a connection to the broker based on a related parameter, the persistent client reconnect interval setting..

A value of 0(the default) indicates no limit and the persistent client runtime will try and connect indefinitely.

Parameters:
minutes - maximum amount of time an offline persistent client attempts to make a broker connection before returning an exception.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), getReconnectTimeout(), setReconnectInterval(int), getReconnectInterval()

setReconnectTimeoutInteger

public void setReconnectTimeoutInteger(java.lang.Integer minutes)
Applicable to persistent client connections only.

Sets how long (in minutes) the offline persistent client runtime attempts to make a connection to the broker. This parameter limits the amount of time a persistent client connection may be offline before an exception is be returned to the ExceptionListener. When offline, persistent client sends are saved in the local client storage. An offline persistent client periodically attempts to make a connection to the broker based on a related parameter, the persistent client reconnect interval setting.

A value of 0(the default) indicates no limit and the persistent client runtime will try and connect indefinitely.

Parameters:
minutes - maximum amount of time an offline persistent client attempts to make a broker connection before returning an exception.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), getLocalStoreSizeLong(), setLocalStoreSizeLong(Long), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger()

getReconnectTimeout

public int getReconnectTimeout()
Applicable to persistent client connections only.

Gets (in minutes) how long the offline persistent client runtime attempts to make a connection to the broker before returning an exception.

A value of 0(the default) indicates no limit and the runtime will try indefinitely.

Returns:
in minutes, maximum amount of time an offline persistent client attempts to make a broker connection before returning an exception.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), getLocalStoreSize(), setLocalStoreSize(long), setReconnectTimeout(int), setReconnectInterval(int), getReconnectInterval()

getReconnectTimeoutInteger

public java.lang.Integer getReconnectTimeoutInteger()
Applicable to persistent client connections only.

Gets (in minutes) how long the offline persistent client runtime attempts to make a connection to the broker before returning an exception.

A value of 0(the default) indicates no limit and the runtime will try indefinitely.

Returns:
in minutes, maximum amount of time an offline persistent client attempts to make a broker connection before returning an exception.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), setReconnectIntervalInteger(Integer), getReconnectIntervalInteger()

setReconnectInterval

public void setReconnectInterval(int secs)
Applicable to persistent client connections only.

Sets the interval (in seconds) at which an offline persistent client runtime attempts to make a connection to the broker. When offline, persistent client sends are saved in the local client storage. The persistent client periodically attempts to make a connection to the broker based on the persistent client reconnect interval setting. A related parameter, the reconnect timeout limits the overall amount of time a persistent client connection may be offline before an exception is be returned to the ExceptionListener.

The default is 30 seconds.

Parameters:
secs - interval between offline persistent client reconnect attempts.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), getReconnectInterval()

setReconnectIntervalInteger

public void setReconnectIntervalInteger(java.lang.Integer secs)
Applicable to persistent client connections only.

Sets the interval (in seconds) at which an offline persistent client runtime attempts to make a connection to the broker. When offline, persistent client sends are saved in the local client storage. The persistent client periodically attempts to make a connection to the broker based on the persistent client reconnect interval setting. A related parameter, the reconnect timeout limits the overall amount of time a persistent client connection may be offline before an exception is be returned to the ExceptionListener.

The default is 30 seconds.

Parameters:
secs - interval between offline persistent client reconnect attempts.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), getReconnectIntervalInteger()

getReconnectInterval

public int getReconnectInterval()
Applicable to persistent client connections only.

Gets the interval (in seconds) at which an offline persistent client runtime attempts to make a connection to the broker.

The default is 30 seconds.

Returns:
in seconds, interval between offline persistent client reconnect attempts.
See Also:
setEnableLocalStore(boolean), isEnableLocalStore(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSize(long), getLocalStoreSize(), setReconnectTimeout(int), getReconnectTimeout(), setReconnectInterval(int)

getReconnectIntervalInteger

public java.lang.Integer getReconnectIntervalInteger()
Applicable to persistent client connections only.

Gets the interval (in seconds) at which an offline persistent client runtime attempts to make a connection to the broker.

The default is 30 seconds.

Returns:
in seconds, interval between offline persistent client reconnect attempts.
See Also:
setEnableLocalStoreBoolean(Boolean), isEnableLocalStoreBoolean(), setLocalStoreDirectory(String), getLocalStoreDirectory(), setLocalStoreSizeLong(Long), getLocalStoreSizeLong(), setReconnectTimeoutInteger(Integer), getReconnectTimeoutInteger(), setReconnectIntervalInteger(Integer)

getUrlsOrUrl

public java.lang.String getUrlsOrUrl()
Return list of brokers to try to connect to. If a url list has been specified via the setConnectionUrls() method, then that list will be returned as a comma separated list. If no list has been specified, but a single broker has, then that single url will be returned.

Returns:
Comma-separated list of broker URLs.
See Also:
setConnectionURLs(String), setBrokerURL(String)

setLoginSPI

public void setLoginSPI(java.lang.String className)
Used to set the class name that implements ILogin interface.

Parameters:
className - the name of the class implementing ILogin interface.

See Also:
ILogin, IPasswordUser

getLoginSPI

public java.lang.String getLoginSPI()
Used to set the class name that implements ILogin interface.

Returns:
className the name of the class implementing ILogin interface.

See Also:
ILogin, IPasswordUser

setSelectorAtBroker

public void setSelectorAtBroker(java.lang.Boolean flag)
If set to true, the message selector logic is performed at the JMS server (broker). Else, it is performed at the JMS client side.

Parameters:
flag - a boolean
See Also:
getSelectorAtBroker()

getSelectorAtBroker

public java.lang.Boolean getSelectorAtBroker()
Returns:
boolean indicating true if the message selector logic is performed at the JMS server (broker).
See Also:
setSelectorAtBroker(Boolean flag)

setDurableMessageOrder

public void setDurableMessageOrder(java.lang.Boolean durableSubscriberMessageOrder)
Enable or disable preservation of message order for reconnecting durable subscribers. This method which takes a Boolean argument is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype. NOTE: If the value is set at the TopicSession level it has preference over the value set at the TopicConnectionFactory level.

Parameters:
durableSubscriberMessageOrder - if true, by default reconnecting durable subscribers will preserve message order)
See Also:
getDurableMessageOrder()

getDurableMessageOrder

public java.lang.Boolean getDurableMessageOrder()
Determines whether the option to preserve message order when reconnecting a durable subscriber has been selected. NOTE: If the value is set at the TopicSession level it has preference over the value set at the TopicConnectionFactory level.

Returns:
If true, a reconnecting durable subscriber will preserve message order across the cluster. If false, a reconnecting durable subscriber will not attempt to preserve message order across the cluster.
See Also:
setDurableMessageOrder(Boolean durableSubscriberMessageOrder)

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Return a javax.naming.Reference object which contains the reference information necessary to create an object of the proper type.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
the Reference object, which contains information to create the desired object.
Throws:
javax.naming.NamingException - if the object naming is invalid.

setPingInterval

public void setPingInterval(long interval)
Enable/disable sending active pings on a connection.

Parameters:
interval - indicates the (long) interval in seconds for sending a ping. Setting interval to 0 or any negative value effectively disables the ping.

getPingInterval

public long getPingInterval()
Get the connection ping interval.

Returns:
The ping interval in seconds (long).
See Also:
setPingInterval(long)

setPingIntervalLong

public void setPingIntervalLong(java.lang.Long interval)
Enable/disable sending active pings on a connection.

Parameters:
interval - indicates the (Long) interval in seconds for sending a ping. Setting interval to 0 or any negative value effectively disables the ping.

getPingIntervalLong

public java.lang.Long getPingIntervalLong()
Get the connection ping interval.

Returns:
The ping interval in seconds (Long).
See Also:
setPingIntervalLong(Long)

setMonitorInterval

public void setMonitorInterval(java.lang.Integer interval)
Set the administrative flow control monitoring interval.

This method which takes a Integer argument is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype.

Parameters:
interval - The interval in seconds over which administrative monitoring of flow control will occur. A value of 0 (zero) indicates that no monitoring will occur.
See Also:
getMonitorInterval()

getMonitorInterval

public java.lang.Integer getMonitorInterval()
Gets the administrative flow control monitoring interval.

This method, which returns an Integer, is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype (as opposed in primative such as int).

Returns:
The interval in seconds over which administrative monitoring of flow control will occur. A value of 0 (zero) indicates that no monitoring will occur.
See Also:
setMonitorInterval(Integer)

setFaultTolerant

public void setFaultTolerant(java.lang.Boolean faultTolerant)
Enable or disable fault tolerant connection creation.

By default, connections are created non-fault tolerant(false). For a connection to be created fault-tolerant, fault-tolerant must be set in the ConnectionFactory, and, the broker must support(be licensed for) fault-tolerance.

Parameters:
faultTolerant - true indicates the client wishes to create fault-tolerant connections
See Also:
getFaultTolerant(), Connection.isFaultTolerant(), setFaultTolerantReconnectTimeout(Integer), getFaultTolerantReconnectTimeout(), setInitialConnectTimeout(Integer), getInitialConnectTimeout(), setClientTransactionBufferSize(Long), getClientTransactionBufferSize()

getFaultTolerant

public java.lang.Boolean getFaultTolerant()
Determines whether fault tolerant connection creation is enabled.

By default, connections are created non-fault tolerant(false). For a connection to be created fault-tolerant, fault-tolerant must be set in the ConnectionFactory, and, the broker must support(be licensed for) fault-tolerance.

Returns:
true indicates the client wishes to create fault-tolerant connections
See Also:
setFaultTolerant(Boolean), Connection.isFaultTolerant(), setFaultTolerantReconnectTimeout(Integer), getFaultTolerantReconnectTimeout(), setInitialConnectTimeout(Integer), getInitialConnectTimeout(), setClientTransactionBufferSize(Long), getClientTransactionBufferSize()

setFaultTolerantReconnectTimeout

public void setFaultTolerantReconnectTimeout(java.lang.Integer seconds)
Set fault tolerance reconnect timeout.

Indicates how long the client runtime will try to establish a physical network connection for the purpose of connection re-establishment after failure. Applicable to fault-tolerant connections only.

For reconnects, attempts are made to the previously connected broker URL and to redundant broker URLs reported by the previously connected broker. Redundant broker URLs may be on the last connected broker(if redundant network interfaces are available), or, on a standby broker. URLs are redundantly associated if they have the same Directory Service acceptor name. The broker dynamically supplies the client runtime with redundant URL information(at connect time and on configuration change). Redundant URL information can be obtained by the progress.message.jclient.Connection methods getBrokerReconnectURLs() and getBrokerStandbyReconnectURLs().

Default 60 seconds. 0 means no timeout; the runtime will try indefinitely, or, until the broker reports that it can no longer support the fault-tolerant client. A broker can limit the amount of time it maintains state on behalf of a failed fault-tolerant client that has not reconnected by configuration of the advanced broker connections parameter "Client Reconnect Timeout".

For reconnects after connection failure, if the connection cannot be reconnected within the allocated time, an exception will be returned to the ExceptionListener(if configured), and all pending connection operations will fail. This is the usual failed connection behavior.

Parameters:
seconds - maximum time in seconds to attempt reconnection of a failed fault-tolerant connection
See Also:
getFaultTolerantReconnectTimeout(), setFaultTolerant(Boolean), getFaultTolerant(), Connection.getBrokerReconnectURLs(), Connection.getStandbyBrokerReconnectURLs(), setInitialConnectTimeout(Integer), getInitialConnectTimeout()

getFaultTolerantReconnectTimeout

public java.lang.Integer getFaultTolerantReconnectTimeout()
Get fault tolerance reconnect timeout.

Returns:
maximum time in seconds to attempt reconnection of a failed fault-tolerant connection
See Also:
setFaultTolerantReconnectTimeout(Integer), setFaultTolerant(Boolean), getFaultTolerant(), setInitialConnectTimeout(Integer), getInitialConnectTimeout()

setInitialConnectTimeout

public void setInitialConnectTimeout(java.lang.Integer seconds)
Set initial connect timeout for a fault-tolerant connection.

Indicates how long the client runtime will try to establish a physical network connection for the purpose of initial connection establishment. Applicable to fault-tolerant connections only.

For initial connections, attempts are made against all URLs listed in the ConnectionFactory. URLs are attempted sequentially. The starting URL is normally the first in the list but can be randomly selected.

Default 30. 0 means no timeout; the runtime will try indefinitely. -1 means each URL is attempted one time only; the runtime will try each URL sequentially one at a time until a successful connection is made, or until all URLs have been tried.

For initial connection establishment, if connection cannot be made within the allocated time the ConnectionFactory create method throws a JMSException.

Parameters:
seconds - maximum time in seconds to attempt initial connection of a fault-tolerant connection
See Also:
getInitialConnectTimeout(), setFaultTolerant(Boolean), getFaultTolerant(), setFaultTolerantReconnectTimeout(Integer), getFaultTolerantReconnectTimeout()

getInitialConnectTimeout

public java.lang.Integer getInitialConnectTimeout()
Get initial connect timeout for a fault-tolerant connection.

Returns:
maximum time in seconds to attempt initial connection of a fault-tolerant connection fault-tolerant connection
See Also:
setInitialConnectTimeout(Integer), setFaultTolerant(Boolean), getFaultTolerant(), setFaultTolerantReconnectTimeout(Integer), getFaultTolerantReconnectTimeout()

setClientTransactionBufferSize

public void setClientTransactionBufferSize(java.lang.Long size)
Set client transaction buffer size. Indicates the maximum size of messages in bytes the client runtime is willing to buffer per transaction to support transactions over fault tolerant connections.

Transacted message remain in the client runtime until saved or replicated by the broker. JMS client threads sending transacted messages will block if the buffer size is reached, and resume when the broker saves or replicates more messages. A larger buffer size should yield better performance at the expense of more client memory and longer resend time during fault-tolerant reconnect.

The default setting (0) indicates that the client runtime must be able to buffer up to the broker Transactions Buffer Size parameter per transaction

Parameters:
size - client transaction buffer size in bytes.
See Also:
getClientTransactionBufferSize(), setFaultTolerant(Boolean), getFaultTolerant()

getClientTransactionBufferSize

public java.lang.Long getClientTransactionBufferSize()
Get client transaction buffer size.

Returns:
client transaction buffer size.
See Also:
setClientTransactionBufferSize(Long), setFaultTolerant(Boolean), getFaultTolerant()

setFlowToDisk

public void setFlowToDisk(java.lang.Integer flag)
Enable or disable Flow-To-Disk Publishing. If the setting is on, specifies that when a subscriber's in-memory buffer is full the broker should offload the messages for the subscriber to the database without blocking the publisher(s).

Parameters:
flag - 0 - use broker-side setting 1 - set the feature "on" for the subscriber 2 - set the feature "off" for the subscriber
See Also:
getFlowToDisk(), Constants.FLOW_TO_DISK_USE_BROKER_SETTING, Constants.FLOW_TO_DISK_ON, Note that while the type of the above constants is int, the type of the flag parameter is Integer, therefore, if you want to use a constant, you need to pass it to the constructor of an Integer object and pass the Integer object to this method.

getFlowToDisk

public java.lang.Integer getFlowToDisk()
Determines the setting of Flow-To-Disk Publishing property.

Returns:
1 - indicates that the feature is "on" for the subscriber. 2 - indicates that the feature is "off" for the subscriber 0 - indicates that there is no setting on the client side, thus, the broker-side setting will be used.
See Also:
setFlowToDisk(Integer), Constants.FLOW_TO_DISK_USE_BROKER_SETTING, Constants.FLOW_TO_DISK_ON, Note that while the type of the above constants is int, the return type of this method is Integer. Use the intValue method to retrieve the result as int.

setSocketConnectTimeout

public void setSocketConnectTimeout(java.lang.Integer value)
Sets a timeout to be used when establishing a socket connection to the broker.

A timeout of 0 is interpreted as an infinite timeout. The default value is 0.

Parameters:
value - the timeout value in milliseconds
See Also:
getSocketConnectTimeout()

getSocketConnectTimeout

public java.lang.Integer getSocketConnectTimeout()
Gets the setting of the socket connect timeout property.

See Also:
setSocketConnectTimeout(Integer)

getBrokerURL

public java.lang.String getBrokerURL()

setBrokerURL

public void setBrokerURL(java.lang.String brokerURL)

getConnectID

public java.lang.String getConnectID()

setConnectID

public void setConnectID(java.lang.String connectID)

getDefaultUser

public java.lang.String getDefaultUser()

setDefaultUser

public void setDefaultUser(java.lang.String username)

getDefaultPassword

public java.lang.String getDefaultPassword()

setDefaultPassword

public void setDefaultPassword(java.lang.String password)

getBrokerHostName

public java.lang.String getBrokerHostName()

setBrokerHostName

public void setBrokerHostName(java.lang.String brokerHostName)

getBrokerProtocol

public java.lang.String getBrokerProtocol()

setBrokerProtocol

public void setBrokerProtocol(java.lang.String brokerProtocol)

getBrokerPort

public int getBrokerPort()

setBrokerPort

public void setBrokerPort(int brokerPort)

setApplet

public void setApplet(java.applet.Applet applet)

getApplet

public java.applet.Applet getApplet()

getClientID

public java.lang.String getClientID()

setClientID

public void setClientID(java.lang.String clientID)
                 throws JMSException
Throws:
JMSException

setLoadBalancing

public void setLoadBalancing(boolean loadBalancing)
Enable or disable client-side load balancing.

Parameters:
loadBalancing - if true, indicates that the client is willing to have a connect request re-directed to another broker within a SonicMQ cluster.
See Also:
getLoadBalancing()

setLoadBalancingBoolean

public void setLoadBalancingBoolean(java.lang.Boolean loadBalancing)
Enable or disable client-side load balancing. This method which takes a Boolean argument is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype.

Parameters:
loadBalancing - if TRUE, indicates that the client is willing to have a connect request re-directed to another broker within a SonicMQ cluster.
See Also:
getLoadBalancingBoolean()

getLoadBalancing

public boolean getLoadBalancing()
Determines whether client-side load balancing is enabled.

Returns:
if true, indicates that the client is willing to have a connect request redirected to another broker within a SonicMQ cluster.
See Also:
setLoadBalancing(boolean)

getLoadBalancingBoolean

public java.lang.Boolean getLoadBalancingBoolean()
Determines whether client-side load balancing is enabled. This method which returns a Boolean is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype.

Returns:
if TRUE, indicates that the client is willing to have a connect request redirected to another broker within a SonicMQ cluster.
See Also:
setLoadBalancingBoolean(Boolean)

setLoadBalancingClientData

public void setLoadBalancingClientData(java.lang.String clientData)
This can be set to provide additional information to assist the broker side load balancer when making load balancing decisions.

Parameters:
clientData - The information to pass to the load balancer.

getLoadBalancingClientData

public java.lang.String getLoadBalancingClientData()
Gets the additional information to be provided to the broker side load balancer to assist in making load balancing decisions.

Returns:
The information to pass to the load balancer.
See Also:
setLoadBalancingClientData(String)

setConnectionURLs

public void setConnectionURLs(java.lang.String brokerList)
Configures a list of brokers to try when creating a connection.

Parameters:
brokerList - Comma-separated list of broker URLs. Allows a client to connect to the first available broker on a list. If present, this parameter overrides the brokerURL parameter in the QueueConnectionFactory constructor, which specifies a single broker. This option can be used independently of any other load balancing options.
See Also:
getConnectionURLs(), setSequential(boolean), getSequential()

getConnectionURLs

public java.lang.String getConnectionURLs()
Return list of brokers to try to connect to.

Returns:
Comma-separated list of broker URLs.
See Also:
setConnectionURLs(String)

setSequential

public void setSequential(boolean sequential)
Specifies whether to start with the first broker in the list or a random element.

Parameters:
sequential - If true, starts attempting to connect to the first broker in the list; if false, starts attempting to connect to a random element in the list. After that, tries to connect to each broker in sequence until a successful connect occurs, or the list is exhausted.
See Also:
getSequential(), setConnectionURLs(String), getConnectionURLs()

setSequentialBoolean

public void setSequentialBoolean(java.lang.Boolean sequential)
Specifies whether to start with the first broker in the list or a random element. This version which uses a Boolean argument is provided for storage interfaces which require that attributes of stored object be of Object datatype.

Parameters:
sequential - If TRUE, starts attempting to connect to the first broker in the list; if FALSE, starts attempting to connect to a random element in the list. After that, tries to connect to each broker in sequence until a successful connect occurs, or the list is exhausted.
See Also:
getSequentialBoolean(), setConnectionURLs(String), getConnectionURLs()

getSequential

public boolean getSequential()
Determines whether the option to start with the first or a random element of the broker list has been selected.

Returns:
If true, connect attempts start with the first broker in the list. If false, connect attempts start with a random element in the broker list.
See Also:
setSequential(boolean), setConnectionURLs(String), getConnectionURLs()

getSequentialBoolean

public java.lang.Boolean getSequentialBoolean()
Determines whether the option to start with the first or a random element of the broker list has been selected. This version which returns a Boolean is provided for storage interfaces which require that attributes of stored object be of Object datatype.

Returns:
If TRUE, connect attempts start with the first broker in the list. If FALSE, connect attempts start with a random element in the broker list.
See Also:
setSequentialBoolean(Boolean), setConnectionURLs(String), getConnectionURLs()

setPersistentDelivery

public void setPersistentDelivery(boolean persistentDelivery)
Enable or disable persistent delivery.

Parameters:
persistentDelivery - if true, by default senders will have there default delivery mode as PERSISTENT.
See Also:
getPersistentDelivery()

setPersistentDeliveryBoolean

public void setPersistentDeliveryBoolean(java.lang.Boolean persistentDelivery)
Enable or disable persistent delivery. This method which takes a Boolean argument is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype.

Parameters:
persistentDelivery - if true, by default senders will have there default delivery mode as PERSISTENT.
See Also:
getPersistentDeliveryBoolean()

getPersistentDelivery

public boolean getPersistentDelivery()
Determines whether the default of PERSISTENT delivery should be applied to publishers.

Returns:
if true, indicates that senders by default will have PERSISTENT delivery.
See Also:
setPersistentDelivery(boolean)

getPersistentDeliveryBoolean

public java.lang.Boolean getPersistentDeliveryBoolean()
Determines whether the default of PERSISTENT delivery should be applied to publishers. This method which returns a Boolean is provided for interoperability with object storage systems which require that the attributes of the stored object be of Object datatype.

Returns:
if TRUE, indicates that senders by default will have PERSISTENT delivery.
See Also:
setPersistentDeliveryBoolean(Boolean)

setPrefetchCount

public void setPrefetchCount(int count)
Set the prefetch count for the QueueReceiver. When this value is greater than one, the broker will be able to send multiple messages as part of a single QueueReceiver request. This can improve performance.

Note that this is a Progress SonicMQ extention not found in the standard QueueReceiver interface.

Parameters:
count - The number of messages to prefetch in int.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchCountInteger(Integer), getPrefetchCount()

getPrefetchCount

public int getPrefetchCount()
Get the prefetch count for the QueueReceiver. When this value is greater than one, the broker will be able to send multiple messages as part of a single QueueReceiver request.

Returns:
The number of messages to prefetch as int.
See Also:
setPrefetchCount(int), getPrefetchCountInteger()

setPrefetchCountInteger

public void setPrefetchCountInteger(java.lang.Integer count)
Set the prefetch count for the QueueReceiver. When this value is greater than one, the broker will be able to send multiple messages as part of a single QueueReceiver request. This can improve performance.

Note that this is a Progress SonicMQ extention not found in the standard QueueReceiver interface.

Parameters:
count - The number of messages to prefetch.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchCount(int), getPrefetchCountInteger()

getPrefetchCountInteger

public java.lang.Integer getPrefetchCountInteger()
Get the prefetch count for the QueueReceiver. When this value is greater than one, the broker will be able to send multiple messages as part of a single QueueReceiver request.

Returns:
The number of messages to prefetch as Integer.
See Also:
setPrefetchCountInteger(Integer), getPrefetchCount()

setPrefetchThreshold

public void setPrefetchThreshold(int val)
Set the default prefetch threshold for the QueueReceivers. When the number of messages waiting to be processed by a QueueReceiver falls to, or below, this number, a new batch of messages will be fetched.

Note that this is a Progress SonicMQ extention not found in the standard QueueReceiver interface.

Parameters:
val - The default threshold value for QueueReceivers.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchThresholdInteger(Integer), getPrefetchThreshold()

getPrefetchThreshold

public int getPrefetchThreshold()
Get the default prefetch threshold for the QueueReceiver. When the number of messages waiting to be processed by the QueueReceiver falls to, or below, this number, a new batch of messages will be fetched.

Returns:
The threshold value for prefetching messages as int.
See Also:
setPrefetchThreshold(int), getPrefetchThresholdInteger()

setPrefetchThresholdInteger

public void setPrefetchThresholdInteger(java.lang.Integer val)
Set the default prefetch threshold for the QueueReceiver. When the number of messages waiting to be processed by the QueueReceiver falls to, or below, this number, a new batch of messages will be fetched.

Note that this is a Progress SonicMQ extention not found in the standard QueueReceiver interface.

Parameters:
val - The default threshold value for QueueReceivers.as an Integer.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchThreshold(int), getPrefetchThresholdInteger()

getPrefetchThresholdInteger

public java.lang.Integer getPrefetchThresholdInteger()
Get the prefetch threshold for the QueueReceiver. When the number of messages waiting to be processed by the QueueReceiver falls to, or below, this number, a new batch of messages will be fetched.

Returns:
The threshold value for prefetching messages as Integer.
See Also:
setPrefetchThresholdInteger(Integer), getPrefetchThreshold()

createConnection

public Connection createConnection()
                            throws JMSException
Creates a connection with the default user identity. The connection is created in stopped mode. No message will be delivered until the Connection.start method is explicitly called.

Specified by:
createConnection in interface ConnectionFactory
Returns:
a newly created connection
Throws:
JMSException - if the JMS provider fails to create the connection due to some internal error.
JMSSecurityException - if client authentication fails due to an invalid user name or password.
Since:
1.1

createConnection

public Connection createConnection(java.lang.String userName,
                                   java.lang.String password)
                            throws JMSException
Creates a connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Specified by:
createConnection in interface ConnectionFactory
Parameters:
userName - the caller's user name
password - the caller's password
Returns:
a newly created connection
Throws:
JMSException - if the JMS provider fails to create the connection due to some internal error.
JMSSecurityException - if client authentication fails due to an invalid user name or password.
Since:
1.1

setDefaultTxnBatchSize

public void setDefaultTxnBatchSize(int size)
Sets the default batch size of all sessions, created via connections created from this ConnectionFactory. A Session's batch size pecifies the amount of information to be batched on the client. This is a performance optimization utilized on transacted sessions. The size parameter is a measure of the message payloads only.

Parameters:
size - The number of bytes to batch, specified as an int.

getDefaultTxnBatchSize

public int getDefaultTxnBatchSize()
Gets the default batch size

Returns:
The number of bytes to batch, specified as an int.

setDefaultTxnBatchSizeInteger

public void setDefaultTxnBatchSizeInteger(java.lang.Integer size)
Sets the default batch size of all sessions, created via connections created from this ConnectionFactory. A Session's batch size pecifies the amount of information to be batched on the client. This is a performance optimization utilized on transacted sessions. The size parameter is a measure of the message payloads only.

Parameters:
size - The number of bytes to batch, specified as an Integer

getDefaultTxnBatchSizeInteger

public java.lang.Integer getDefaultTxnBatchSizeInteger()
Gets the default batch size

Returns:
The number of bytes to batch, specified as an int.

getSplitMultiTopicDelivery

public java.lang.Boolean getSplitMultiTopicDelivery()
Gets the default value for splitting MultiTopic message delivery. Determines whether a message with a MultiTopic destination should be delivered to a subscriber as a single message with a MultiTopic destination or as multiple messages one for each Topic in the MultiTopic. Split should be true if the message must be ackowledged on a per topic basis, but will incur additional overhead at the cost of performance

Returns:
The split delivery value.

setSplitMultiTopicDelivery

public void setSplitMultiTopicDelivery(java.lang.Boolean value)
Sets the default value for splitting MultiTopic message delivery. Determines whether a message with a MultiTopic destination should be delivered to a subscriber as a single message with a MultiTopic destination or as multiple messages one for each Topic in the MultiTopic. Split should be true if the message must be ackowledged on a per topic basis, but will incur additional overhead at the cost of performance

Parameters:
value - The split delivery value.

getRethrowCCRuntimeExceptions

public java.lang.Boolean getRethrowCCRuntimeExceptions()
Gets the value for determining whether to rethrow RuntimeExceptions encountered by a ConnectionConsumer's onMesssage(). A value of true indicates that the RuntimeException will be thrown through Session.run(). A value of false indicates that the RuntimeException will be passed to the ExceptionListener's onException(). This behavior only applies to ConnectionConsumers.

Returns:
The rethrow CC RuntimeExceptions value.

setRethrowCCRuntimeExceptions

public void setRethrowCCRuntimeExceptions(java.lang.Boolean value)
Sets the value for determining whether to rethrow RuntimeExceptions encountered by a ConnectionConsumer's onMesssage(). A value of true indicates that the RuntimeException will be thrown through Session.run(). A value of false indicates that the RuntimeException will be passed to the ExceptionListener's onException(). This behavior only applies to ConnectionConsumers.

Parameters:
value - The rethrow CC RuntimeExceptions value.

getQopCacheSize

public java.lang.Integer getQopCacheSize()
Gets the number of destination<->QOP entries that are retained for Sessions that are derived from this factory. This value should be set to a value higher than the number of destinations to which producers will produce on a given Session or the client will need to re-request QOP values from the broker.

This setting is only applicable when the broker has security enabled.

Returns:
The maximum number of destinations<->QOP entries that can be stored before the oldest destination<->QOP values is discarded

setQopCacheSize

public void setQopCacheSize(java.lang.Integer value)
Sets the number of destination<->QOP entries that are retained for Sessions that are derived from this factory. This value should be set to a value higher than the number of destinations to which producers will produce on a given Session or the client will need to re-request QOP values from the broker.

This setting is only applicable when the broker has security enabled.

Parameters:
value - The maximum number of destinations<->QOP entries that can be stored before the oldest destination<->QOP values is discarded

getMaxDeliveryCount

public java.lang.Integer getMaxDeliveryCount()
Gets the maximum number of times delivery of a message to a consumer should be attempted. A value of 0 indicates no limit. Messages that have exceeded the delivery limit are processed according to message properties that govern disposition of undeliverable messages.

Returns:
Integer the delivery limit

setMaxDeliveryCount

public void setMaxDeliveryCount(java.lang.Integer value)
Sets the maximum number of times delivery of a message to a consumer should be attempted. A value of 0 indicates no limit. Messages that have exceeded the delivery limit are processed according to message properties that govern disposition of undeliverable messages.

The default value is 0.

Parameters:
value - the delivery limit

setMaxSendBufferSize

public void setMaxSendBufferSize(java.lang.Integer value)
Sets the maximum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport. Increasing this value can help to improve throughput. Decreasing this value can help to lower message latency.

Parameters:
value - The buffer size or null to use the system default.

getMaxSendBufferSize

public java.lang.Integer getMaxSendBufferSize()
Gets the maximum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.

Returns:
The buffer size or null if not specified.

setMinSendBufferSize

public void setMinSendBufferSize(java.lang.Integer value)
Sets the minimum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport. Increasing this value can help to improve throughput.

If this value is set higher than the maximum value (or the default maximum value if it is not explicitly set in this factory) will result in the connection using the maximum value as the minimum. To avoid ambiguity set both the max and min values.

Parameters:
value - The buffer size or null to use the system default.

getMinSendBufferSize

public java.lang.Integer getMinSendBufferSize()
Gets the minimum size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.

Returns:
The buffer size or null if not specified.

setInitialSendBufferSize

public void setInitialSendBufferSize(java.lang.Integer value)
Sets the initial size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport. Setting this to the same value as MaxIOSendBufferSize can help to reduce the cost of resizing the buffer, but may incur extra memory overhead.

If the initial size is to a value higher than the maximum or lower than the minimum it will be adjusted to the value nearest possible valid value.

Parameters:
value - The buffer size or null to use the default.

getInitialSendBufferSize

public java.lang.Integer getInitialSendBufferSize()
Gets the initial size of the buffer (in bytes) used to buffer message traffic prior to writing to the network transport.

Returns:
The buffer size or null if not set.

setMaxRcvBufferSize

public void setMaxRcvBufferSize(java.lang.Integer value)
Sets the maximum size of the buffer (in bytes) used when reading message traffic from the network transport.

Parameters:
value - The buffer size or null to use the default

getMaxRcvBufferSize

public java.lang.Integer getMaxRcvBufferSize()
Gets the maximum size of the buffer (in bytes) used when reading message traffic from the network transport.

Returns:
The buffer size or null if not set.

setMinRcvBufferSize

public void setMinRcvBufferSize(java.lang.Integer value)
Sets the minimum size of the buffer (in bytes) used when reading message traffic from the network transport.

If this value is set higher than the maximum value (or the default maximum value if it is not explicitly set in this factory) will result in the connection using the maximum value as the minimum. To avoid ambiguity set both the max and min values.

Parameters:
value - The buffer size or null to use the default

getMinRcvBufferSize

public java.lang.Integer getMinRcvBufferSize()
Gets the minimum size of the buffer (in bytes) used when reading message traffic from the network transport.

Returns:
The buffer size or null if not set.

setInitialRcvBufferSize

public void setInitialRcvBufferSize(java.lang.Integer value)
Sets the initial size of the buffer (in bytes) used when reading message traffic from the network transport.

If the initial size is to a value higher than the maximum or lower than the minimum it will be adjusted to the value nearest possible valid value.

Parameters:
value - The buffer size or null to use the default

getInitialRcvBufferSize

public java.lang.Integer getInitialRcvBufferSize()
Gets the initial size of the buffer (in bytes) used when reading message traffic from the network transport.

Returns:
The buffer size or null if not set.

setAsynchronousDeliveryMode

public final void setAsynchronousDeliveryMode(java.lang.Integer mode)
                                       throws java.lang.IllegalArgumentException

Sets whether or not messages sent by MessageProducers on a connection's producers should be sent to the broker synchronously or asynchronously.

A synchronously sent message must be acknowledged as received by the broker before the send()/publish() call returns. Messages sent asynchronously do not wait for acknowledgement from the broker. This is an extension of the JMS 1.1 specification; the JMS specification does not provide the capability of asynchronous message production

Sending messages asynchronously can improve performance since the send call can return without waiting for acknowledgement, but it increases the number of messages that are in doubt if there is an application or connection failure. The number of in-doubt asynchronously produced messages can be controlled by using setDeliveryDoubtWindow(Integer)

When messages are sent asynchronously, delivery exceptions that occur on the broker will not be reported during the send call. This can complicate application development, particularly in applications for which message ordering is critical. Broker generated exceptions can be reported asynchronously by setting a RejectionListener on the Connection using Connection.setRejectionListener(RejectionListener). Asynchronous delivery exceptions are only reported on connections that explicitly set Constants.ASYNC_DELIVERY_MODE_ENABLED

Sending message asynchronously can also result in longer Connection and Session close() calls since completion of message delivery is done in the background and can be delayed for a number of reasons such as flow control or acknowledgement delays. If messages are still pending delivery then a close() call will block according the value specified by setDeliveryCloseTimeout(Long)

This setting does not apply to messages sent with DeliveryMode.DISCARDABLE delivery mode. It also does not apply to messages produced by a Producer on a transacted Session.

This setting does not override delivery modes that specify asynchronous or synchronous delivery (e.g. the deprecated delivery modes DeliveryMode.NON_PERSISTENT_SYNC and DeliveryMode.NON_PERSISTENT_ASYNC)

Default: Constants.ASYNC_DELIVERY_MODE_DEFAULT

Parameters:
mode - Constant describing the asynchronous delivery mode:
Throws:
java.lang.IllegalArgumentException - if the delivery mode constant is not one of the constants listed above
Since:
7.6
See Also:
setDeliveryDoubtWindow(Integer), setDeliveryCloseTimeout(Long), Constants.ASYNC_DELIVERY_MODE_DEFAULT, Constants.ASYNC_DELIVERY_MODE_ENABLED, Constants.ASYNC_DELIVERY_MODE_DISABLED, Connection.setRejectionListener(RejectionListener)

getAsynchronousDeliveryMode

public final java.lang.Integer getAsynchronousDeliveryMode()

Gets whether or not messages sent by MessageProducers on a Connection's producers should be sent to the broker synchronously or asynchronously.

Returns:
The asynchronous delivery mode setting.
Since:
7.6
See Also:
setAsynchronousDeliveryMode(Integer), Constants.ASYNC_DELIVERY_MODE_DEFAULT, Constants.ASYNC_DELIVERY_MODE_ENABLED, Constants.ASYNC_DELIVERY_MODE_DISABLED

setDeliveryCloseTimeout

public final void setDeliveryCloseTimeout(java.lang.Long timeout)
                                   throws java.lang.IllegalArgumentException

The amount of time in milliseconds to wait on a per Session basis for unsent messages to be sent to the broker when a Session is closed.

A value of 0 means that the close will not wait for unsent messages to be delivered to the broker. A value of -1 will cause close() to block until messages have been delivered to the broker. Otherwise a positive timeout value will wait up to timeout for messages to be delivered to the broker.

In the event that close() times out:

Default: 0 close() will not wait for unsent messages to be delivered to the broker.

Parameters:
timeout - The amount of time in milliseconds to wait for unsent messages to be delivered to the broker
Throws:
java.lang.IllegalArgumentException - if the value is null or less than -1
Since:
7.6
See Also:
setAsynchronousDeliveryMode(Integer)

getDeliveryCloseTimeout

public final java.lang.Long getDeliveryCloseTimeout()

The amount of time in milliseconds to wait on a per Session basis for unsent messages to be sent to the broker when a Session is closed.

Returns:
the timeout for messages to be sent when a Session is closed.
See Also:
setDeliveryCloseTimeout(Long)

setDeliveryDoubtWindow

public final void setDeliveryDoubtWindow(java.lang.Integer numMessages)
                                  throws java.lang.IllegalArgumentException

Sets the limit on the number of unacknowledged messages per Session when asynchronous message delivery is enabled.

Receipt of asynchronously delivered messages by the broker is in doubt until Session.close() or Connection.close() completes normally. When close() completes normally any messages that could not be delivered will have been reported on the Connection's RejectionListener (if set) prior to close() returning. Otherwise if the connection is terminated abnormally by a connection drop, application failure or an Exception on close() the limit specifies how many messages will be in doubt.

It is worth noting that if asynchronous delivery is disabled this setting has no effect. In this case only a single message for which a publish() or send() call generates an exception will be in doubt.

This setting does not apply to messages sent from within a transacted Session.

Limiting the number of indoubt messages can have a negative impact on performance as it may introduce additional protocol based tracking for produced messages.

A value of 0 indicates that there is no limit other than the Session's available buffer space.

Default: 0 The number of undelivered messages is not explicitly limited.

Throws:
java.lang.IllegalArgumentException - if the value is null or less than 0
See Also:
setAsynchronousDeliveryMode(Integer)

getDeliveryDoubtWindow

public final java.lang.Integer getDeliveryDoubtWindow()

Gets the limit on the number of unacknowledged messages per Session when asynchronous message delivery is enabled.

Returns:
The limit on the number of unacknowledged messages.
See Also:
setDeliveryDoubtWindow(java.lang.Integer)

setEnableActionalInstrumentation

public void setEnableActionalInstrumentation(boolean enabled)
Set to indicate if the LG instrumentation is enabled locally.

Parameters:
enabled - the boolean value to indicate if the LG instrumentation is enabled locally.
See Also:
getEnableActionalInstrumentation()

setEnableActionalInstrumentationBoolean

public void setEnableActionalInstrumentationBoolean(java.lang.Boolean enabled)
Set to indicate if the LG instrumentation is enabled locally.

Parameters:
enabled - the Boolean value to indicate if the LG instrumentation is enabled locally.
See Also:
getEnableActionalInstrumentationBoolean()

getEnableActionalInstrumentation

public boolean getEnableActionalInstrumentation()
Queries the ConnectionFactory to see if the LG instrumentation is currently enabled.

Returns:
boolean value indicating if the LG instrumentation is currently enabled.
See Also:
setEnableActionalInstrumentation(boolean)

getEnableActionalInstrumentationBoolean

public java.lang.Boolean getEnableActionalInstrumentationBoolean()
Queries the ConnectionFactory to see if the LG instrumentation is currently enabled.

Returns:
Boolean value indicating if the LG instrumentation is currently enabled.
See Also:
setEnableActionalInstrumentationBoolean(Boolean)

setRequireActionalJMSNode

public void setRequireActionalJMSNode(boolean required)
Set to indicate if the JMS node should be reported by the LG upstream node, i.e., the broker.

Parameters:
required - the boolean value to indicate if the JMS node should be reported by the LG upstream node.

setRequireActionalJMSNodeBoolean

public void setRequireActionalJMSNodeBoolean(java.lang.Boolean required)
Set to indicate if the JMS node should be reported by the LG upstream node, i.e., the broker.

Parameters:
required - the Boolean value to indicate if the JMS node should be reported by the LG upstream node.

getRequireActionalJMSNode

public boolean getRequireActionalJMSNode()
Queries if the JMS node should be reported by the LG upstream node, i.e., the broker.

Returns:
the boolean value to indicate if the JMS node should be reported by the LG upstream node.

getRequireActionalJMSNodeBoolean

public java.lang.Boolean getRequireActionalJMSNodeBoolean()
Queries if the JMS node should be reported by the LG upstream node, i.e., the broker.

Returns:
the Boolean value to indicate if the JMS node should be reported by the LG upstream node.

setLGDownStreamNodeType

public void setLGDownStreamNodeType(int peerType)

getLGDownStreamNodeType

public int getLGDownStreamNodeType()

setEnableCompression

public void setEnableCompression(boolean enabled)
Set to indicate if compression should be enabled for the connections.

Parameters:
enabled - the boolean value to indicate if compression should enabled.
See Also:
setEnableCompressionBoolean(Boolean), getEnableCompression(), getEnableCompressionBoolean()

getEnableCompression

public boolean getEnableCompression()
Queries the ConnectionFactory to see if compression is enabled.

Returns:
the boolean value indicating if compression is enabled.
See Also:
getEnableCompressionBoolean(), setEnableCompression(boolean), setEnableCompressionBoolean(Boolean)

setEnableCompressionBoolean

public void setEnableCompressionBoolean(java.lang.Boolean enabled)
Set to indicate if compression should be enabled for the connections.

Parameters:
enabled - the Boolean value to indicate if compression should enabled.
See Also:
setEnableCompression(boolean), getEnableCompressionBoolean(), getEnableCompression()

getEnableCompressionBoolean

public java.lang.Boolean getEnableCompressionBoolean()
Queries the ConnectionFactory to see if compression is enabled.

Returns:
the boolean value indicating if compression is enabled.
See Also:
setEnableCompressionBoolean(Boolean), setEnableCompression(boolean), getEnableCompression()

setCompressionFactory

public void setCompressionFactory(java.lang.String factory)
Set the class name of the compression factory.

Parameters:
factory - the class name of the compression factory.
See Also:
getCompressionFactory()

getCompressionFactory

public java.lang.String getCompressionFactory()
Queries the ConnectionFactory of the class name of the compression factory.

Returns:
the class name of the compression factory.
See Also:
setCompressionFactory(String)

setMinimizeSubscriberTraffic

public void setMinimizeSubscriberTraffic(boolean minimizeTraffic)
Set to minimizethe traffic for TopicSubscriber and DurableSubscriber. When enabled, the subscriber will attempt to flow control the broker immediately after the very first message is received - note that the subscriber could receive more messages put on the wire by the broker before it receiving the flow control message. The sending will resume when the subscriber's buffer becomes empty.

Parameters:
minimizeTraffic - the boolean value to inidcate if subscriber traffic should be minimized.
See Also:
setMinimizeSubscriberTrafficBoolean(Boolean), getMinimizeSubscriberTraffic(), getMinimizeSubscriberTrafficBoolean()

getMinimizeSubscriberTraffic

public boolean getMinimizeSubscriberTraffic()
Queries the ConnectionFactory to see if subscriber traffic is to be minimized.

Returns:
the boolean value indicating if subscriber traffic is minimized.
See Also:
setMinimizeSubscriberTraffic(boolean), setMinimizeSubscriberTrafficBoolean(Boolean), getMinimizeSubscriberTrafficBoolean()

setMinimizeSubscriberTrafficBoolean

public void setMinimizeSubscriberTrafficBoolean(java.lang.Boolean minimizeTraffic)
Set to minimizethe traffic for TopicSubscriber and DurableSubscriber. When enabled, the subscriber will attempt to flow control the broker immediately after the very first message is received - note that the subscriber could receive more messages put on the wire by the broker before it receiving the flow control message. The sending will resume when the subscriber's buffer becomes empty.

Parameters:
minimizeTraffic - the boolean value to inidcate if subscriber traffic should be minimized.
See Also:
setMinimizeSubscriberTraffic(boolean), getMinimizeSubscriberTraffic(), getMinimizeSubscriberTrafficBoolean()

getMinimizeSubscriberTrafficBoolean

public java.lang.Boolean getMinimizeSubscriberTrafficBoolean()
Queries the ConnectionFactory to see if subscriber traffic is to be minimized.

Returns:
the boolean value indicating if subscriber traffic is minimized.
See Also:
setMinimizeSubscriberTraffic(boolean), setMinimizeSubscriberTrafficBoolean(Boolean), getMinimizeSubscriberTraffic()

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.