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.Object json)
For Internal use only, may be removed or deprecated in future.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.lang.String
getOAuth2ClientId()
Get the OAuth 2.0 client ID for this factory.boolean
getOAuth2DisableVerifyHostname()
Returns whether client verification of the OAuth 2.0 authorization server's hostname is disabled for this factory.java.lang.String
getOAuth2ExpectedHostname()
Get the hostname expected to be set in the OAuth 2.0 authorization server host's certificate for this factory.java.util.Map
getOAuth2Params()
Get the OAuth 2.0 parameters for this factory.java.lang.String
getOAuth2ServerTrustFile()
Get the path to the trust file used to verify the OAuth 2.0 authorization server's identity for this factory.java.lang.String
getOAuth2ServerURL()
Get the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server for this factory.java.util.Map
getParams()
Get the TLS and/or OAuth 2.0 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.util.Map
getSSLParams()
Get the TLS parameters 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
setOAuth2ClientId(java.lang.String id)
Set the OAuth 2.0 client ID for this factory.void
setOAuth2DisableVerifyHostname(boolean disableVerifyHostname)
Set whether client verification of the OAuth 2.0 authorization server's hostname should be disabled for this factory.void
setOAuth2ExpectedHostname(java.lang.String expectedHostname)
Set the hostname expected to be found in the OAuth 2.0 authorization server host's certificate for this factory.void
setOAuth2Params(java.util.Map params)
Set the OAuth 2.0 parameters for this factory.void
setOAuth2ServerTrustFile(java.lang.String file)
Set the path to the trust file used to verify the OAuth 2.0 authorization server's identity for this factory.void
setOAuth2ServerURL(java.lang.String url)
Set the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server for this factory.void
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 and/or OAuth 2.0 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 and/or OAuth 2.0 parameters for the connections created with this factory (can be null).
-
ConnectionFactoryInfo
public ConnectionFactoryInfo(java.lang.Object json) throws JMSException
For Internal use only, may be removed or deprecated in future.- Throws:
JMSException
-
-
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 and/or OAuth 2.0 parameters for this factory.- Returns:
- the TLS and/or OAuth 2.0 parameters for this factory or null if none exist.
-
getSSLParams
public java.util.Map getSSLParams()
Get the TLS parameters for this factory.- Returns:
- the TLS parameters for this factory or null if none exist.
- Since:
- EMS 10.4.0
-
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).
-
getOAuth2Params
public java.util.Map getOAuth2Params()
Get the OAuth 2.0 parameters for this factory.- Returns:
- the OAuth 2.0 parameters for this factory or null if none exist.
- Since:
- EMS 10.4.0
-
setOAuth2Params
public void setOAuth2Params(java.util.Map params)
Set the OAuth 2.0 parameters for this factory.- Parameters:
params
- the OAuth 2.0 parameters for this factory (can be null).- Since:
- EMS 10.4.0
-
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.
-
getOAuth2ServerURL
public java.lang.String getOAuth2ServerURL()
Get the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server for this factory.- Returns:
- the URL of the OAuth 2.0 authorization server.
- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_URL
-
setOAuth2ServerURL
public void setOAuth2ServerURL(java.lang.String url)
Set the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server for this factory.- Parameters:
the
- URL of the OAuth 2.0 authorization server.- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_URL
-
getOAuth2ClientId
public java.lang.String getOAuth2ClientId()
Get the OAuth 2.0 client ID for this factory. This value is used along with the OAuth 2.0 client secret to connect to the OAuth 2.0 authorization server and obtain access tokens for authenticating with the EMS server.- Returns:
- the OAuth 2.0 client ID.
- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_CLIENT_ID
-
setOAuth2ClientId
public void setOAuth2ClientId(java.lang.String id)
Set the OAuth 2.0 client ID for this factory. This value is used along with the OAuth 2.0 client secret to connect to the OAuth 2.0 authorization server and obtain access tokens for authenticating with the EMS server.- Parameters:
the
- OAuth 2.0 client ID.- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_CLIENT_ID
-
getOAuth2ServerTrustFile
public java.lang.String getOAuth2ServerTrustFile()
Get the path to the trust file used to verify the OAuth 2.0 authorization server's identity for this factory. This verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Returns:
- the path to trust file.
- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_TRUST_FILE
-
setOAuth2ServerTrustFile
public void setOAuth2ServerTrustFile(java.lang.String file)
Set the path to the trust file used to verify the OAuth 2.0 authorization server's identity for this factory. This verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Parameters:
the
- path to the trust file.- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_TRUST_FILE
-
getOAuth2DisableVerifyHostname
public boolean getOAuth2DisableVerifyHostname()
Returns whether client verification of the OAuth 2.0 authorization server's hostname is disabled for this factory. Verification is enabled by default and is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Returns:
- true if verification is disabled, false otherwise.
- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_DISABLE_VERIFY_HOSTNAME
-
setOAuth2DisableVerifyHostname
public void setOAuth2DisableVerifyHostname(boolean disableVerifyHostname)
Set whether client verification of the OAuth 2.0 authorization server's hostname should be disabled for this factory. Verification is enabled by default and is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Parameters:
true
- if verification should be disabled, false otherwise.- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_DISABLE_VERIFY_HOSTNAME
-
getOAuth2ExpectedHostname
public java.lang.String getOAuth2ExpectedHostname()
Get the hostname expected to be set in the OAuth 2.0 authorization server host's certificate for this factory. Hostname verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Returns:
- the expected hostname.
- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_EXPECTED_HOSTNAME
-
setOAuth2ExpectedHostname
public void setOAuth2ExpectedHostname(java.lang.String expectedHostname)
Set the hostname expected to be found in the OAuth 2.0 authorization server host's certificate for this factory. Hostname verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server.- Parameters:
the
- expected hostname.- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_EXPECTED_HOSTNAME
-
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.
-
-