Package com.tibco.tibjms.admin
Class ConnectionFactoryInfo
- java.lang.Object
-
- com.tibco.tibjms.admin.ConnectionFactoryInfo
-
public class ConnectionFactoryInfo extends java.lang.Object
A ConnectionFactoryInfo object represents a configured ConnectionFactory that can be retrieved by an EMS client through the built in JNDI implementation. This class is used to create and alter the properties of the ConnectionFactory.
-
-
Field Summary
Fields Modifier and Type Field Description static int
METRIC_BYTE_RATE
Connection factory load balances by generating a connection to the server with the lowest total byte rate, input and output.static int
METRIC_CONNECTIONS
Connection factory load balances by generating a connection to the server with the fewest number of connections.static int
METRIC_NONE
Connection factory is not load balanced.
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryInfo(java.lang.String url, java.lang.String clientID, int type, boolean xa, java.util.Map params)
Creates ConnectionFactoryInfo.ConnectionFactoryInfo(java.lang.String url, java.lang.String clientID, int type, java.util.Map params)
Creates ConnectionFactoryInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getClientID()
Get the clientID for this factory.int
getConnectAttemptCount()
Get the connect_attempt_count for this factory.int
getConnectAttemptDelay()
Get the connect_attempt_delay for this factory.int
getConnectAttemptTimeout()
Get the reconnect_attempt_timeout for this factory.int
getDestinationType()
Get the destination type for this factory.java.lang.String[]
getJNDINames()
Return the array of names that this factory is bound to in the default JNDI.int
getMetric()
Get the metric used for load balancing.java.lang.String
getMulticastDaemon()
Deprecated.As of release 8.3boolean
getMulticastEnabled()
Deprecated.As of release 8.3java.util.Map
getParams()
Get the TLS parameters for this factory.int
getReconnectAttemptCount()
Get the reconnect_attempt_count for this factory.int
getReconnectAttemptDelay()
Get the reconnect_attempt_delay for this factory.int
getReconnectAttemptTimeout()
Get the reconnect_attempt_timeout for this factory.java.lang.String
getURL()
Get the URL for this factory.boolean
getXAType()
Returns whether or not the factory is an XA factory.boolean
isLoadBalanced()
Indicates whether or not the connection factory is load balanced.void
setClientID(java.lang.String clientID)
Set the clientID for this factory.void
setConnectAttemptCount(int count)
Set the connect_attempt_count for this factory.void
setConnectAttemptDelay(int delay)
Set the connect_attempt_delay for this factory.void
setConnectAttemptTimeout(int connectAttemptTimeout)
Set the connect_attempt_timeout for this factory.void
setDestinationType(int destType)
Set the destination type for this factory.void
setMetric(int metric)
Set the metric to be used for load balancing.void
setMulticastDaemon(java.lang.String multicastDaemon)
Deprecated.As of release 8.3void
setMulticastEnabled(boolean multicastEnabled)
Deprecated.As of release 8.3void
setReconnectAttemptCount(int count)
Set the reconnect_attempt_count for this factory.void
setReconnectAttemptDelay(int delay)
Set the reconnect_attempt_delay for this factory.void
setReconnectAttemptTimeout(int reconnectAttemptTimeout)
Set the reconnect_attempt_timeout for this factory.void
setSSLParams(java.util.Map params)
Set the TLS parameters for this factory.void
setURL(java.lang.String url)
Set the URL for this factory.void
setXAType(boolean xa)
Set (or unset) this factory as XA connection factory.java.lang.String
toString()
Generate a string representation of this ConnectionFactoryInfo.
-
-
-
Field Detail
-
METRIC_NONE
public static final int METRIC_NONE
Connection factory is not load balanced.- See Also:
- Constant Field Values
-
METRIC_CONNECTIONS
public static final int METRIC_CONNECTIONS
Connection factory load balances by generating a connection to the server with the fewest number of connections.- See Also:
- Constant Field Values
-
METRIC_BYTE_RATE
public static final int METRIC_BYTE_RATE
Connection factory load balances by generating a connection to the server with the lowest total byte rate, input and output.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionFactoryInfo
public ConnectionFactoryInfo(java.lang.String url, java.lang.String clientID, int type, java.util.Map params)
Creates ConnectionFactoryInfo. The ConnectionFactory is not created on the server until TibjmsAdmin.createConnectionFactory() is called.- Parameters:
url
- The server URL for the factory.clientID
- The clientID for the connection created by this factory.type
- Factory type. Can be DestinationInfo.QUEUE_TYPE, DestinationInfo.TOPIC_TYPE or DestinationInfo.ALL_TYPE where latter creates a generic connection factory.params
- The TLS parameters for the connections created with this factory (can be null).
-
ConnectionFactoryInfo
public ConnectionFactoryInfo(java.lang.String url, java.lang.String clientID, int type, boolean xa, java.util.Map params)
Creates ConnectionFactoryInfo. The ConnectionFactory is not created on the server until TibjmsAdmin.createConnectionFactory() is called.- Parameters:
url
- The server URL for the factory.clientID
- The clientID for the connection created by this factory.type
- Factory type. Can be DestinationInfo.QUEUE_TYPE, DestinationInfo.TOPIC_TYPE or DestinationInfo.ALL_TYPE where latter creates a generic connection factory.xa
- XA type. Set to true if this is an XA connection factory.params
- The TLS parameters for the connections created with this factory (can be null).
-
-
Method Detail
-
getJNDINames
public java.lang.String[] getJNDINames()
Return the array of names that this factory is bound to in the default JNDI.- Returns:
- the array of names for this factory.
-
getURL
public java.lang.String getURL()
Get the URL for this factory.- Returns:
- the URL for this factory.
-
setURL
public void setURL(java.lang.String url)
Set the URL for this factory.- Parameters:
url
- the URL for this factory.
-
getClientID
public java.lang.String getClientID()
Get the clientID for this factory.- Returns:
- the clientID for this factory.
-
setClientID
public void setClientID(java.lang.String clientID)
Set the clientID for this factory.- Parameters:
clientID
- the clientID for this factory.
-
getParams
public java.util.Map getParams()
Get the TLS parameters for this factory.- Returns:
- the TLS parameters for this factory or null if none exist.
-
setSSLParams
public void setSSLParams(java.util.Map params)
Set the TLS parameters for this factory.- Parameters:
params
- the TLS parameters for this factory (can be null).
-
getDestinationType
public int getDestinationType()
Get the destination type for this factory.- Returns:
- the destination type for this factory. DestinationInfo.QUEUE_TYPE, DestinationInfo.TOPIC_TYPE or DestinationInfo.ALL_TYPE if it is a generic factory.
-
setDestinationType
public void setDestinationType(int destType)
Set the destination type for this factory.- Parameters:
destType
- the destination type for this factory. Can be set as DestinationInfo.QUEUE_TYPE, DestinationInfo.TOPIC_TYPE or DestinationInfo.ALL_TYPE if generic factory.
-
getXAType
public boolean getXAType()
Returns whether or not the factory is an XA factory.- Returns:
- true if this is XA factory, false otherwise.
-
setXAType
public void setXAType(boolean xa)
Set (or unset) this factory as XA connection factory.- Parameters:
xa
- true if the factory is to be an XA connection factory, false if not.
-
isLoadBalanced
public boolean isLoadBalanced()
Indicates whether or not the connection factory is load balanced.- Returns:
- true if the factory is load balanced, false otherwise.
-
getMetric
public int getMetric()
Get the metric used for load balancing. If the factory is not load balanced the metric returned will beMETRIC_NONE
. If the factory is load balanced but no metric has been set explicitly the metric returned will be the defaultMETRIC_CONNECTIONS
.- Returns:
- the metric. Possible values are
METRIC_CONNECTIONS
,METRIC_BYTE_RATE
orMETRIC_NONE
-
setMetric
public void setMetric(int metric)
Set the metric to be used for load balancing. If the factory is not load balanced the metric will have no effect.- Parameters:
metric
- the metric. Valid values areMETRIC_CONNECTIONS
, andMETRIC_BYTE_RATE
.
-
setConnectAttemptCount
public void setConnectAttemptCount(int count)
Set the connect_attempt_count for this factory.- Parameters:
count
- the connect_attempt_count for this factory.
-
getConnectAttemptCount
public int getConnectAttemptCount()
Get the connect_attempt_count for this factory.- Returns:
- the connect_attempt_count for this factory.
-
setConnectAttemptDelay
public void setConnectAttemptDelay(int delay)
Set the connect_attempt_delay for this factory.- Parameters:
delay
- the connect_attempt_delay for this factory.
-
getConnectAttemptDelay
public int getConnectAttemptDelay()
Get the connect_attempt_delay for this factory.- Returns:
- the connect_attempt_delay for this factory.
-
setConnectAttemptTimeout
public void setConnectAttemptTimeout(int connectAttemptTimeout)
Set the connect_attempt_timeout for this factory.- Parameters:
connectAttemptTimeout
- the connect_attempt_timeout for this factory.
-
getConnectAttemptTimeout
public int getConnectAttemptTimeout()
Get the reconnect_attempt_timeout for this factory.- Returns:
- the connect_attempt_timeout for this factory.
-
setReconnectAttemptCount
public void setReconnectAttemptCount(int count)
Set the reconnect_attempt_count for this factory.- Parameters:
count
- the reconnect_attempt_count for this factory.
-
getReconnectAttemptCount
public int getReconnectAttemptCount()
Get the reconnect_attempt_count for this factory.- Returns:
- the reconnect_attempt_count for this factory.
-
setReconnectAttemptDelay
public void setReconnectAttemptDelay(int delay)
Set the reconnect_attempt_delay for this factory.- Parameters:
delay
- the reconnect_attempt_delay for this factory.
-
getReconnectAttemptDelay
public int getReconnectAttemptDelay()
Get the reconnect_attempt_delay for this factory.- Returns:
- the reconnect_attempt_delay for this factory.
-
setReconnectAttemptTimeout
public void setReconnectAttemptTimeout(int reconnectAttemptTimeout)
Set the reconnect_attempt_timeout for this factory.- Parameters:
reconnectAttemptTimeout
- the reconnect_attempt_timeout for this factory.
-
getReconnectAttemptTimeout
public int getReconnectAttemptTimeout()
Get the reconnect_attempt_timeout for this factory.- Returns:
- the reconnect_attempt_timeout for this factory.
-
setMulticastEnabled
@Deprecated public void setMulticastEnabled(boolean multicastEnabled)
Deprecated.As of release 8.3Set whether or not the factory is multicast-enabled.- Parameters:
multicastEnabled
- true if the factory is to be multicast-enabled
-
getMulticastEnabled
@Deprecated public boolean getMulticastEnabled()
Deprecated.As of release 8.3Returns whether or not the factory is multicast-enabled.- Returns:
- true if this factory is multicast-enabled, false otherwise.
-
setMulticastDaemon
@Deprecated public void setMulticastDaemon(java.lang.String multicastDaemon)
Deprecated.As of release 8.3Set the multicast daemon port for this factory.- Parameters:
multicastDaemon
- the multicast daemon port for this factory
-
getMulticastDaemon
@Deprecated public java.lang.String getMulticastDaemon()
Deprecated.As of release 8.3Get the multicast daemon port for this factory.- Returns:
- the multicast daemon port for this factory
-
toString
public java.lang.String toString()
Generate a string representation of this ConnectionFactoryInfo.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this ConnectionFactoryInfo.
-
-