Package com.webmethods.jms.impl
Class WmConnectionFactoryImpl
- java.lang.Object
-
- com.webmethods.jms.impl.WmConnectionFactoryImpl
-
- All Implemented Interfaces:
WmConnectionFactory
,java.io.Externalizable
,java.io.Serializable
,javax.jms.ConnectionFactory
,javax.naming.Referenceable
- Direct Known Subclasses:
WmQueueConnectionFactoryImpl
,WmTopicConnectionFactoryImpl
,WmXAConnectionFactoryImpl
public class WmConnectionFactoryImpl extends java.lang.Object implements WmConnectionFactory, javax.naming.Referenceable, java.io.Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_clusterPolicyName
protected java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory>
_compositeChildConnFactories
protected boolean
_logApi
protected static java.lang.String
APPLICATION
protected static java.lang.String
BROKER_CLUSTER
protected static java.lang.String
BROKER_HOST
protected static java.lang.String
BROKER_LIST
protected static java.lang.String
BROKER_LIST_ORDER
protected static java.lang.String
BROKER_NAME
protected static java.lang.String
CLIENT_GROUP
protected static java.lang.String
CLIENT_ID
protected static java.lang.String
CLUSTER_CREATED_TIME
protected static java.lang.String
CLUSTER_DOCSIZE_DATA
protected static java.lang.String
CLUSTER_INCLUDE_ALL
protected static java.lang.String
CLUSTER_MULTISEND_BROKERCOUNT
Deprecated.protected static java.lang.String
CLUSTER_MULTISEND_COUNT
protected static java.lang.String
CLUSTER_NAME
protected static java.lang.String
CLUSTER_POLICY
protected static java.lang.String
CLUSTER_POLICY_OVERRIDE
protected static java.lang.String
CLUSTER_REFRESH_INTERVAL
protected static java.lang.String
CLUSTER_WEIGHTED_ROUNDROBIN_DATA
protected static java.lang.String
COMPOSITE_CHILD_CLUSTER_FACTORY_OBJECTS
protected static java.lang.String
COMPOSITE_CLUSTER_FACTORIES
protected static java.lang.String
MARSHAL_IN
protected static java.lang.String
MARSHAL_OUT
protected static java.lang.String
READ_ONLY
protected static java.lang.String
SSL_CIPHERSUITES
protected static java.lang.String
SSL_ENCRYPTED
protected static java.lang.String
SSL_KEYSTORE
protected static java.lang.String
SSL_KEYSTORETYPE
protected static java.lang.String
SSL_TRUSTSTORE
protected static java.lang.String
SSL_TRUSTSTORETYPE
-
Fields inherited from interface com.webmethods.jms.WmConnectionFactory
DEFAULT_APPLICATION_NAME, DEFAULT_BROKER_LIST_ORDER, DEFAULT_CLIENT_GROUP, DEFAULT_KEYSTORE_TYPE, DEFAULT_TRUSTSTORE_TYPE
-
-
Constructor Summary
Constructors Constructor Description WmConnectionFactoryImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareConnectionFactory(java.lang.Object connFactory)
Define equality of connection factory statejavax.jms.Connection
createConnection()
Creates a connection with the default user identity.javax.jms.Connection
createConnection(java.lang.String userName, java.lang.String password)
Creates a connection with the specified user identity.javax.jms.Connection
createConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates a connection with the specified user identity and accesslabel hint The connection is created in stopped mode.javax.jms.QueueConnection
createQueueConnection()
Creates a queue connection with the default user identity.javax.jms.QueueConnection
createQueueConnection(java.lang.String userName, java.lang.String password)
Creates a queue connection with the specified user identity.javax.jms.QueueConnection
createQueueConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates a queue connection with the specified user identity.javax.jms.TopicConnection
createTopicConnection()
Creates a topic connection with the default user identity.javax.jms.TopicConnection
createTopicConnection(java.lang.String userName, java.lang.String password)
Creates a topic connection with the specified user identity.javax.jms.TopicConnection
createTopicConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates a topic connection with the specified user identity.javax.jms.XAConnection
createXAConnection()
Creates anXAConnection
with the default user identity.javax.jms.XAConnection
createXAConnection(java.lang.String userName, java.lang.String password)
Creates an XA connection with the specified user identity.javax.jms.XAConnection
createXAConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates an XA connection with the specified user identity.javax.jms.XAQueueConnection
createXAQueueConnection()
Creates an XA queue connection with the default user identity.javax.jms.XAQueueConnection
createXAQueueConnection(java.lang.String userName, java.lang.String password)
Creates an XA queue connection with the specified user identity.javax.jms.XAQueueConnection
createXAQueueConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates an XA queue connection with the specified user identity.javax.jms.XATopicConnection
createXATopicConnection()
Creates an XA topic connection with the default user identity.javax.jms.XATopicConnection
createXATopicConnection(java.lang.String userName, java.lang.String password)
Creates an XA topic connection with the specified user identity.javax.jms.XATopicConnection
createXATopicConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint)
Creates an XA topic connection with the specified user identity.static WmConnectionFactoryImpl
fromPropertyString(java.lang.String propString)
java.lang.String
getApplication()
Get the client application for a connection created from this factory.boolean
getAutomaticControlLabel()
Get the flag to enable broker to set control label automatically ( for webMethods' content based security )java.util.concurrent.CopyOnWriteArrayList<java.lang.String>
getBrokerCluster()
Get the list of cluster Brokers assigned to this connection factory.java.lang.String
getBrokerHost()
Get the Broker host for a connection created from this factory.java.lang.String
getBrokerList()
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature.java.lang.String
getBrokerListOrder()
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature.java.lang.String
getBrokerName()
Get the Broker name for a connection created from this factory.java.util.List<BrokerURL>
getBrokerURLs()
java.lang.String
getClientGroup()
Gets the client group for this factory.java.lang.String
getClientID()
Gets the client identifier for this factory.java.lang.String
getClusterConnectionId()
long
getClusterCreationTime()
Get the time of creation of this cluster connection factoryjava.lang.String
getClusterName()
Get the cluster name of the connection factory.int
getClusterPolicy()
Gets the cluster policy assgined to this connection factory.java.lang.String
getClusterPolicyName()
Get the cluster policy name of the cluster connection factory.boolean
getClusterPolicyOverride()
Get if the user has overridden the cluster policy to enable custom stickiness.long
getClusterRefreshInterval()
Get the refresh interval for this connection factory.java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory>
getCompositeChildConnFactories()
Get the list of child cluster connection factory objects assigned to this connection factory.java.util.concurrent.CopyOnWriteArrayList<java.lang.String>
getCompositeClusterCF()
Get the list of JNDI look up names for the child cluster connection factories assigned to this connection factory.static java.lang.String
getDefaultClientGroup()
java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>
getDocSizeDataMap()
java.util.concurrent.CopyOnWriteArrayList<DocumentSize>
getDocSizeList()
boolean
getIncludeAllBrokers()
Get whether the include all flag is set.boolean
getIsCompositeFactory()
WmMarshalIn
getMarshalIn()
Get the inbound message marshalling object for connections created from this factory.java.lang.String
getMarshalInClassName()
Get the inbound message marshalling class name.WmMarshalOut
getMarshalOut()
Get the outbound message marshalling object for connections created from this factory.java.lang.String
getMarshalOutClassName()
Get the outbound message marshalling class name.int
getMultiSendCount()
Gets the count of N brokers in cluster for MULTISEND_GUARANTEED policy The JMS provider will ensure that a message is published to N out of M brokers in the Cluster for MULTISEND_GUARANTEED.WmClusterPolicy
getPolicy()
protected java.lang.String
getPolicyName(int policy)
boolean
getReadOnly()
Get whether this connection factory is read-only.javax.naming.Reference
getReference()
boolean
getSSLEncrypted()
Get whether SSL encryption is enabled or disabled.java.lang.String
getSSLKeystore()
Get the SSL certificate keystore.java.lang.String
getSSLKeystoreType()
Get the SSL keystore type.java.lang.String
getSSLTruststore()
Get the SSL Truststore.java.lang.String
getSSLTruststoreType()
Get the SSL Truststore type.java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>
getWeightedRoundRobinDataMap()
java.util.concurrent.CopyOnWriteArrayList<WeightedRoundRobin>
getWeightedRoundRobinList()
Get a list of WeightedRoundRobin objects for the WEIGHTED_ROUND_ROBIN policy.boolean
isClusterFactory()
Checks if this connection factory is associated with a cluster of Brokers.boolean
isCompositeClusterFactory()
Checks if this connection factory is a composite connection factory and hence associated with a list of child cluster connection factories.protected java.lang.String
makePropertyString()
void
readExternal(java.io.ObjectInput in)
void
setApplication(java.lang.String application)
Set the client application for a connection created from this factory.protected void
setAttribute(java.lang.String name, java.lang.Object value)
void
setAutomaticControlLabel(boolean enable)
Enable broker to set control label automatically ( for webMethods' content based security )void
setBrokerCluster(java.lang.String[] brokers)
Assigns the list of cluster Brokers to this connection factory, which will enable load balancing functions.void
setBrokerHost(java.lang.String brokerHost)
Set the Broker host for a connection created from this factory.void
setBrokerList(java.lang.String brokerList)
Use this to set the Broker list for webMethods Broker Publisher Reconnect feature.void
setBrokerListOrder(java.lang.String brokerListOrder)
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature.void
setBrokerName(java.lang.String brokerName)
Set the Broker name for a connection created from this factory.void
setClientGroup(java.lang.String clientGroup)
Sets the client group for a connection created from this factory.void
setClientID(java.lang.String clientID)
Sets the client identifier for a connection created from this factory.void
setClusterConnectionId(java.lang.String clusterConnectionId)
void
setClusterCreationTime(long creationTime)
void
setClusterName(java.lang.String name)
Set the name of the cluster for the connection factory.void
setClusterPolicy(int policy)
Assign the given cluster policy to the connection factory.void
setClusterPolicyName(java.lang.String policyName)
Assign the given cluster policy name to the connection factory.void
setClusterPolicyOverride(boolean clusterPolicyOverride)
Override the cluster policy to enable custom stickiness.void
setClusterRefreshInterval(long time)
Set the refresh interval for this connection factory.void
setCompositeChildConnFactories(java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory> childConnFactories)
Set a list of child Cluster Connection Factory objects for this connection factory.void
setCompositeClusterCF(java.lang.String[] connectionFactories)
Assigns the list of child cluster connection factory names to this connection factory, which will enable it as a composite factory.void
setDocSizeDataMap(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> map)
void
setDocSizeList(java.util.concurrent.CopyOnWriteArrayList<DocumentSize> list)
Sets the data for DocumentSize policyvoid
setIncludeAllBrokers(boolean includeAll)
Sets the flag that would include all the brokers in the cluster If the flag is set all the brokers in the cluster will be included as a part of this connection factory.void
setIsCompositeFactory(boolean compositeFactory)
void
setMarshalIn(WmMarshalIn marshaller, java.lang.Object userData)
Set the inbound message marshalling object for a connection created from this factory.void
setMarshalInClassName(java.lang.String newClassName)
Set the inbound message marshalling class name for connections created from this factory.void
setMarshalOut(WmMarshalOut marshaller, java.lang.Object userData)
Set the outbound message marshalling object for a connection created from this factory.void
setMarshalOutClassName(java.lang.String newClassName)
Set the outbound message marshalling class name for connections created from this factory.void
setMultiSendCount(int count)
Sets the count of N brokers for MULTISEND_GUARANTEED policy The JMS provider will ensure that a message is published to N out of M brokers in the Cluster for MULTISEND_GUARANTEED.void
setReadOnly()
Set this connection factory to read-only.void
setSSLEncrypted(boolean sslEncrypted)
Enable or disable SSL encryption..void
setSSLKeystore(java.lang.String sslKeystore)
Set the SSL certificate keystore.void
setSSLKeystoreType(java.lang.String sslKeystoretype)
Set the SSL keystore type.void
setSSLTruststore(java.lang.String sslTruststore)
Set the SSL Truststore.void
setSSLTruststoreType(java.lang.String sslTruststoretype)
Set the SSL Truststore type.void
setWeightedRoundRobinDataMap(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> map)
void
setWeightedRoundRobinList(java.util.concurrent.CopyOnWriteArrayList<WeightedRoundRobin> weightedData)
Set a list of WeightedRoundRobin objects for the WEIGHTED_ROUND_ROBIN policy.java.lang.String
toString()
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Field Detail
-
_logApi
protected boolean _logApi
-
_clusterPolicyName
protected java.lang.String _clusterPolicyName
-
_compositeChildConnFactories
protected java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory> _compositeChildConnFactories
-
CLIENT_ID
protected static final java.lang.String CLIENT_ID
- See Also:
- Constant Field Values
-
BROKER_HOST
protected static final java.lang.String BROKER_HOST
- See Also:
- Constant Field Values
-
BROKER_NAME
protected static final java.lang.String BROKER_NAME
- See Also:
- Constant Field Values
-
BROKER_LIST
protected static final java.lang.String BROKER_LIST
- See Also:
- Constant Field Values
-
BROKER_LIST_ORDER
protected static final java.lang.String BROKER_LIST_ORDER
- See Also:
- Constant Field Values
-
SSL_ENCRYPTED
protected static final java.lang.String SSL_ENCRYPTED
- See Also:
- Constant Field Values
-
SSL_KEYSTORE
protected static final java.lang.String SSL_KEYSTORE
- See Also:
- Constant Field Values
-
SSL_TRUSTSTORE
protected static final java.lang.String SSL_TRUSTSTORE
- See Also:
- Constant Field Values
-
SSL_KEYSTORETYPE
protected static final java.lang.String SSL_KEYSTORETYPE
- See Also:
- Constant Field Values
-
SSL_TRUSTSTORETYPE
protected static final java.lang.String SSL_TRUSTSTORETYPE
- See Also:
- Constant Field Values
-
SSL_CIPHERSUITES
protected static final java.lang.String SSL_CIPHERSUITES
- See Also:
- Constant Field Values
-
CLIENT_GROUP
protected static final java.lang.String CLIENT_GROUP
- See Also:
- Constant Field Values
-
READ_ONLY
protected static final java.lang.String READ_ONLY
- See Also:
- Constant Field Values
-
APPLICATION
protected static final java.lang.String APPLICATION
- See Also:
- Constant Field Values
-
MARSHAL_IN
protected static final java.lang.String MARSHAL_IN
- See Also:
- Constant Field Values
-
MARSHAL_OUT
protected static final java.lang.String MARSHAL_OUT
- See Also:
- Constant Field Values
-
BROKER_CLUSTER
protected static final java.lang.String BROKER_CLUSTER
- See Also:
- Constant Field Values
-
CLUSTER_POLICY
protected static final java.lang.String CLUSTER_POLICY
- See Also:
- Constant Field Values
-
CLUSTER_NAME
protected static final java.lang.String CLUSTER_NAME
- See Also:
- Constant Field Values
-
CLUSTER_REFRESH_INTERVAL
protected static final java.lang.String CLUSTER_REFRESH_INTERVAL
- See Also:
- Constant Field Values
-
CLUSTER_CREATED_TIME
protected static final java.lang.String CLUSTER_CREATED_TIME
- See Also:
- Constant Field Values
-
CLUSTER_INCLUDE_ALL
protected static final java.lang.String CLUSTER_INCLUDE_ALL
- See Also:
- Constant Field Values
-
CLUSTER_WEIGHTED_ROUNDROBIN_DATA
protected static final java.lang.String CLUSTER_WEIGHTED_ROUNDROBIN_DATA
- See Also:
- Constant Field Values
-
CLUSTER_MULTISEND_COUNT
protected static final java.lang.String CLUSTER_MULTISEND_COUNT
- See Also:
- Constant Field Values
-
CLUSTER_MULTISEND_BROKERCOUNT
@Deprecated protected static final java.lang.String CLUSTER_MULTISEND_BROKERCOUNT
Deprecated.- See Also:
- Constant Field Values
-
CLUSTER_DOCSIZE_DATA
protected static final java.lang.String CLUSTER_DOCSIZE_DATA
- See Also:
- Constant Field Values
-
COMPOSITE_CLUSTER_FACTORIES
protected static final java.lang.String COMPOSITE_CLUSTER_FACTORIES
- See Also:
- Constant Field Values
-
COMPOSITE_CHILD_CLUSTER_FACTORY_OBJECTS
protected static final java.lang.String COMPOSITE_CHILD_CLUSTER_FACTORY_OBJECTS
- See Also:
- Constant Field Values
-
CLUSTER_POLICY_OVERRIDE
protected static final java.lang.String CLUSTER_POLICY_OVERRIDE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnection
public javax.jms.Connection createConnection() throws javax.jms.JMSException
Creates a connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Specified by:
createConnection
in interfacejavax.jms.ConnectionFactory
- Returns:
- a newly created connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createConnection
public javax.jms.Connection createConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates a connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Specified by:
createConnection
in interfacejavax.jms.ConnectionFactory
- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createConnection
public javax.jms.Connection createConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates a connection with the specified user identity and accesslabel hint The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Specified by:
createConnection
in interfaceWmConnectionFactory
- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createTopicConnection
public javax.jms.TopicConnection createTopicConnection() throws javax.jms.JMSException
Creates a topic connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Returns:
- a newly created topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create a topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createTopicConnection
public javax.jms.TopicConnection createTopicConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates a topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create a topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createTopicConnection
public javax.jms.TopicConnection createTopicConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates a topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create a topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createQueueConnection
public javax.jms.QueueConnection createQueueConnection() throws javax.jms.JMSException
Creates a queue connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Returns:
- a newly created queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createQueueConnection
public javax.jms.QueueConnection createQueueConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates a queue connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createQueueConnection
public javax.jms.QueueConnection createQueueConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates a queue connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create the queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAConnection
public javax.jms.XAConnection createXAConnection() throws javax.jms.JMSException
Creates anXAConnection
with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Returns:
- a newly created
XAConnection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAConnection
public javax.jms.XAConnection createXAConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates an XA connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created XA connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAConnection
public javax.jms.XAConnection createXAConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates an XA connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created XA connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXATopicConnection
public javax.jms.XATopicConnection createXATopicConnection() throws javax.jms.JMSException
Creates an XA topic connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Returns:
- a newly created XA topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXATopicConnection
public javax.jms.XATopicConnection createXATopicConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates an XA topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created XA topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXATopicConnection
public javax.jms.XATopicConnection createXATopicConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates an XA topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created XA topic connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA topic connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAQueueConnection
public javax.jms.XAQueueConnection createXAQueueConnection() throws javax.jms.JMSException
Creates an XA queue connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Returns:
- a newly created XA queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAQueueConnection
public javax.jms.XAQueueConnection createXAQueueConnection(java.lang.String userName, java.lang.String password) throws javax.jms.JMSException
Creates an XA queue connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created XA queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createXAQueueConnection
public javax.jms.XAQueueConnection createXAQueueConnection(java.lang.String userName, java.lang.String password, java.lang.String accessLabelHint) throws javax.jms.JMSException
Creates an XA queue connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Parameters:
userName
- the caller's user namepassword
- the caller's passwordaccessLabelHint
- the access label hint- Returns:
- a newly created XA queue connection
- Throws:
javax.jms.JMSException
- if the JMS provider fails to create an XA queue connection due to some internal error.javax.jms.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setClientID
public void setClientID(java.lang.String clientID) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Sets the client identifier for a connection created from this factory.- Specified by:
setClientID
in interfaceWmConnectionFactory
- Parameters:
clientID
- the unique client identifier- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the client ID for this factory due to some internal error.- See Also:
WmConnectionFactory.getClientID()
-
getClientID
public java.lang.String getClientID() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Gets the client identifier for this factory.- Specified by:
getClientID
in interfaceWmConnectionFactory
- Returns:
- the unique client identifier
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the client ID for this connection due to some internal error.- See Also:
WmConnectionFactory.setClientID(java.lang.String)
-
setClientGroup
public void setClientGroup(java.lang.String clientGroup) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Sets the client group for a connection created from this factory.- Specified by:
setClientGroup
in interfaceWmConnectionFactory
- Parameters:
clientGroup
- the connection's client group- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the client group for this factory due to some internal error.- See Also:
WmConnectionFactory.getClientGroup()
-
getClientGroup
public java.lang.String getClientGroup() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Gets the client group for this factory.- Specified by:
getClientGroup
in interfaceWmConnectionFactory
- Returns:
- the connection's client group
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the client group for this connection due to some internal error.- See Also:
WmConnectionFactory.setClientGroup(java.lang.String)
-
setBrokerName
public void setBrokerName(java.lang.String brokerName) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the Broker name for a connection created from this factory.- Specified by:
setBrokerName
in interfaceWmConnectionFactory
- Parameters:
brokerName
- the connection's Broker name- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the Broker name for this factory due to some internal error.- See Also:
WmConnectionFactory.getBrokerName()
-
getBrokerName
public java.lang.String getBrokerName() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the Broker name for a connection created from this factory.- Specified by:
getBrokerName
in interfaceWmConnectionFactory
- Returns:
- the connection's Broker name
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the Broker name for this connection due to some internal error.- See Also:
WmConnectionFactory.setBrokerName(java.lang.String)
-
setBrokerHost
public void setBrokerHost(java.lang.String brokerHost) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the Broker host for a connection created from this factory.- Specified by:
setBrokerHost
in interfaceWmConnectionFactory
- Parameters:
brokerHost
- the connection's Broker host- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the Broker host for this factory due to some internal error.- See Also:
WmConnectionFactory.getBrokerHost()
-
getBrokerHost
public java.lang.String getBrokerHost() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the Broker host for a connection created from this factory.- Specified by:
getBrokerHost
in interfaceWmConnectionFactory
- Returns:
- the connection's Broker host
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the Broker host for this connection due to some internal error.- See Also:
WmConnectionFactory.setBrokerHost(java.lang.String)
-
setBrokerList
public void setBrokerList(java.lang.String brokerList) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Use this to set the Broker list for webMethods Broker Publisher Reconnect feature. See the webMethods Broker Messaging Guide for more details on the feature. UseWmConnectionFactory.getBrokerList()
for fetching the list of Brokers for the Publisher Reconnect feature. A set of comma delimited list of Broker addresses for this factory. The syntax for a Broker address is:[Broker Name]@host[:port]
The list also supports the "-random" keyword. By inserting the keyword "-random" into the list the Broker addresses following the keyword "-random" will be shuffled.- Specified by:
setBrokerList
in interfaceWmConnectionFactory
- Parameters:
brokerList
- a comma delimited list of Broker addresses- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the list of Broker addresses for this factory due to some internal error.
-
getBrokerList
public java.lang.String getBrokerList() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature. See the webMethods Broker Messaging Guide for more details on the feature. UseWmConnectionFactory.setBrokerList(String)
for setting the Broker list. It does not give you a list of Brokers in the JMS client-side policy based cluster. Get the comma delimited list of Broker addresses for this factory.- Specified by:
getBrokerList
in interfaceWmConnectionFactory
- Returns:
- the comma delimited list of Broker addresses
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the list of Broker addresses for this connection due to some internal error.
-
setBrokerListOrder
public void setBrokerListOrder(java.lang.String brokerListOrder) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature. See the webMethods Broker Messaging Guide for more details on the feature. Set the order to connect with Brokers list- Specified by:
setBrokerListOrder
in interfaceWmConnectionFactory
- Parameters:
brokerListOrder
- Random or Sequential- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the list of Broker addresses for this factory due to some internal error.
-
getBrokerListOrder
public java.lang.String getBrokerListOrder() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Use this to get the Broker list for webMethods Broker Publisher Reconnect feature. See the webMethods Broker Messaging Guide for more details on the feature. Get the order to connect with brokers list- Specified by:
getBrokerListOrder
in interfaceWmConnectionFactory
- Returns:
- broker list order
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the list of Broker addresses for this connection due to some internal error.
-
setApplication
public void setApplication(java.lang.String application) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the client application for a connection created from this factory.- Specified by:
setApplication
in interfaceWmConnectionFactory
- Parameters:
application
- the connection's application- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the application for this connection due to some internal error.- See Also:
WmConnectionFactory.getApplication()
-
getApplication
public java.lang.String getApplication() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the client application for a connection created from this factory.- Specified by:
getApplication
in interfaceWmConnectionFactory
- Returns:
- the connection's application
- Throws:
javax.jms.JMSException
- if the JMS provider fails to return the application for this connection due to some internal error.- See Also:
WmConnectionFactory.setApplication(java.lang.String)
-
setSSLKeystore
public void setSSLKeystore(java.lang.String sslKeystore) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the SSL certificate keystore.- Specified by:
setSSLKeystore
in interfaceWmConnectionFactory
- Parameters:
sslKeystore
- the SSL certificate keystore- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the SSL certificate keystore for this connection due to some internal error.
-
getSSLKeystore
public java.lang.String getSSLKeystore() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the SSL certificate keystore.- Specified by:
getSSLKeystore
in interfaceWmConnectionFactory
- Returns:
- the SSL certificate keystore
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the SSL certificate keystore for this connection due to some internal error.
-
setSSLTruststore
public void setSSLTruststore(java.lang.String sslTruststore) throws javax.jms.JMSException
Set the SSL Truststore.- Specified by:
setSSLTruststore
in interfaceWmConnectionFactory
- Parameters:
sslTruststore
- the SSL Truststore- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the SSL truststore for this connection due to some internal error.- See Also:
getSSLTruststore()
-
getSSLTruststore
public java.lang.String getSSLTruststore() throws javax.jms.JMSException
Get the SSL Truststore.- Specified by:
getSSLTruststore
in interfaceWmConnectionFactory
- Returns:
- the SSL truststore
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the SSL truststore for this connection due to some internal error.- See Also:
setSSLTruststore(java.lang.String)
-
setSSLEncrypted
public void setSSLEncrypted(boolean sslEncrypted) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Enable or disable SSL encryption..- Specified by:
setSSLEncrypted
in interfaceWmConnectionFactory
- Parameters:
sslEncrypted
-true
to encrypt the data- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the encryption for this connection due to some internal error.
-
getSSLEncrypted
public boolean getSSLEncrypted() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get whether SSL encryption is enabled or disabled.- Specified by:
getSSLEncrypted
in interfaceWmConnectionFactory
- Returns:
true
if encryption is enabled- Throws:
javax.jms.JMSException
- if the JMS provider fails to get whether SSL encryption is enabled or disabled for this connection due to some internal error.
-
setSSLTruststoreType
public void setSSLTruststoreType(java.lang.String sslTruststoretype) throws javax.jms.JMSException
Set the SSL Truststore type.- Specified by:
setSSLTruststoreType
in interfaceWmConnectionFactory
- Parameters:
sslTruststoretype
- the SSL Truststore type- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the SSL truststore type for this connection due to some internal error.- See Also:
getSSLTruststoreType()
-
getSSLTruststoreType
public java.lang.String getSSLTruststoreType() throws javax.jms.JMSException
Get the SSL Truststore type.- Specified by:
getSSLTruststoreType
in interfaceWmConnectionFactory
- Returns:
- the SSL truststore type
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the SSL truststore type for this connection due to some internal error.- See Also:
setSSLTruststoreType(java.lang.String)
-
getSSLKeystoreType
public java.lang.String getSSLKeystoreType() throws javax.jms.JMSException
Get the SSL keystore type.- Specified by:
getSSLKeystoreType
in interfaceWmConnectionFactory
- Returns:
- the SSL keystore type
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the SSL certificate keystore type for this connection due to some internal error.- See Also:
SSL_KEYSTORETYPE
,setSSLKeystoreType(java.lang.String)
-
setSSLKeystoreType
public void setSSLKeystoreType(java.lang.String sslKeystoretype) throws javax.jms.JMSException
Set the SSL keystore type.- Specified by:
setSSLKeystoreType
in interfaceWmConnectionFactory
- Parameters:
sslKeystoretype
- the SSL keystore type- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the SSL certificate keystore type for this connection due to some internal error.- See Also:
getSSLKeystoreType()
-
setMarshalOut
public void setMarshalOut(WmMarshalOut marshaller, java.lang.Object userData) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the outbound message marshalling object for a connection created from this factory.- Specified by:
setMarshalOut
in interfaceWmConnectionFactory
- Parameters:
marshaller
- the marshaller that will be called for each message that is published or sent on the connections created from this factoryuserData
- a user Object that will be passed to the marshaller on each invocation- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the marshalling object for this connection due to some internal error.- See Also:
WmConnectionFactory.setMarshalIn(com.webmethods.jms.marshal.WmMarshalIn, java.lang.Object)
,WmMarshalOut
-
getMarshalOut
public WmMarshalOut getMarshalOut() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the outbound message marshalling object for connections created from this factory.If the marshaller was set using the classname method, the class is instantiated at this time if it hasn't already been created.
- Specified by:
getMarshalOut
in interfaceWmConnectionFactory
- Returns:
- the marshaller that will be called for each message that is published or sent on the connections created from this factory
- Throws:
javax.jms.JMSException
- if the ConnectionFactory is unable to return the marshalling object. Generally this is caused by problems instantiating the marshalling object from the class specified usingsetMarshalOutClassName
.- See Also:
WmConnectionFactory.setMarshalOut(com.webmethods.jms.marshal.WmMarshalOut, java.lang.Object)
,WmConnectionFactory.setMarshalOutClassName(String)
,WmMarshalOut
-
setMarshalOutClassName
public void setMarshalOutClassName(java.lang.String newClassName) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the outbound message marshalling class name for connections created from this factory.The class will be instantiated when the first connection is created from the
ConnectionFactory
or when the marshalling object is retrieved usinggetMarshalOut
.- Specified by:
setMarshalOutClassName
in interfaceWmConnectionFactory
- Parameters:
newClassName
- the class for the marshaller that will be called for each message that is published or sent on the connections created from this factory- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the marshalling class name.- See Also:
WmConnectionFactory.getMarshalOutClassName()
,WmMarshalOut
-
getMarshalOutClassName
public java.lang.String getMarshalOutClassName()
Description copied from interface:WmConnectionFactory
Get the outbound message marshalling class name.- Specified by:
getMarshalOutClassName
in interfaceWmConnectionFactory
- Returns:
- the name of the class of the marshaller that will be called for each message that is published or sent on the connections created from this factory
- See Also:
WmConnectionFactory.setMarshalOutClassName(String)
,WmMarshalOut
-
setMarshalIn
public void setMarshalIn(WmMarshalIn marshaller, java.lang.Object userData) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the inbound message marshalling object for a connection created from this factory.- Specified by:
setMarshalIn
in interfaceWmConnectionFactory
- Parameters:
marshaller
- the marshaller that will be called for each event that is received from the broker on the connections created from this factoryuserData
- a user Object that will be passed to the marshaller on each invocation- Throws:
javax.jms.JMSException
- if the ConnectionFactory is unable to return the marshalling class name.- See Also:
WmConnectionFactory.setMarshalOut(com.webmethods.jms.marshal.WmMarshalOut, java.lang.Object)
,WmMarshalIn
-
getMarshalIn
public WmMarshalIn getMarshalIn() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get the inbound message marshalling object for connections created from this factory.If the marshaller was set using the classname method, the class is instantiated at this time if it hasn't already been created.
- Specified by:
getMarshalIn
in interfaceWmConnectionFactory
- Returns:
- the marshaller the marshaller that will be called for each event that is received from the broker on the connections created from this factory
- Throws:
javax.jms.JMSException
- if the ConnectionFactory is unable to return the marshalling object. Generally this is caused by problems instantiating the marshalling object from the class specified usingsetMarshalInClassName
.- See Also:
WmConnectionFactory.setMarshalIn(com.webmethods.jms.marshal.WmMarshalIn, java.lang.Object)
,WmConnectionFactory.setMarshalInClassName(String)
,WmMarshalIn
-
setMarshalInClassName
public void setMarshalInClassName(java.lang.String newClassName) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set the inbound message marshalling class name for connections created from this factory.The class will be instantiated when the first connection is created from the
ConnectionFactory
or when the marshalling object is retrieved usinggetMarshalIn
.- Specified by:
setMarshalInClassName
in interfaceWmConnectionFactory
- Parameters:
newClassName
- the class for the marshaller that will be called for each message that is received on the connections created from this factory- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the marshalling class name.- See Also:
WmConnectionFactory.getMarshalInClassName()
,WmMarshalIn
-
getMarshalInClassName
public java.lang.String getMarshalInClassName()
Description copied from interface:WmConnectionFactory
Get the inbound message marshalling class name.- Specified by:
getMarshalInClassName
in interfaceWmConnectionFactory
- Returns:
- the name of the class of the marshaller that will be called for each message that is received on the connections created from this factory
- See Also:
WmConnectionFactory.setMarshalInClassName(String)
,WmMarshalIn
-
setReadOnly
public void setReadOnly() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set this connection factory to read-only. Once set to read-only none of the connection factory's attributes can be modified.- Specified by:
setReadOnly
in interfaceWmConnectionFactory
- Throws:
javax.jms.JMSException
- See Also:
WmConnectionFactory.getReadOnly()
-
getReadOnly
public boolean getReadOnly() throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Get whether this connection factory is read-only.- Specified by:
getReadOnly
in interfaceWmConnectionFactory
- Returns:
- whether this connection factory is read-only
- Throws:
javax.jms.JMSException
-
getDefaultClientGroup
public static java.lang.String getDefaultClientGroup()
-
setAutomaticControlLabel
public void setAutomaticControlLabel(boolean enable) throws javax.jms.JMSException
Enable broker to set control label automatically ( for webMethods' content based security )- Specified by:
setAutomaticControlLabel
in interfaceWmConnectionFactory
- Parameters:
enable
- enable the automatic access label- Throws:
javax.jms.JMSException
-
getAutomaticControlLabel
public boolean getAutomaticControlLabel() throws javax.jms.JMSException
Get the flag to enable broker to set control label automatically ( for webMethods' content based security )- Returns:
- enable auto access label flag
- Throws:
javax.jms.JMSException
-
getReference
public javax.naming.Reference getReference() throws javax.naming.NamingException
- Specified by:
getReference
in interfacejavax.naming.Referenceable
- Throws:
javax.naming.NamingException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
makePropertyString
protected java.lang.String makePropertyString()
-
fromPropertyString
public static WmConnectionFactoryImpl fromPropertyString(java.lang.String propString)
-
getBrokerURLs
public java.util.List<BrokerURL> getBrokerURLs() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
setAttribute
protected void setAttribute(java.lang.String name, java.lang.Object value)
-
setBrokerCluster
public void setBrokerCluster(java.lang.String[] brokers) throws javax.jms.JMSException
Assigns the list of cluster Brokers to this connection factory, which will enable load balancing functions.- Specified by:
setBrokerCluster
in interfaceWmConnectionFactory
- Parameters:
brokers
-- Throws:
javax.jms.JMSException
-
getBrokerCluster
public java.util.concurrent.CopyOnWriteArrayList<java.lang.String> getBrokerCluster()
Description copied from interface:WmConnectionFactory
Get the list of cluster Brokers assigned to this connection factory.- Specified by:
getBrokerCluster
in interfaceWmConnectionFactory
- Returns:
- cluster Brokers assigned to this connection factory.
-
isClusterFactory
public boolean isClusterFactory()
Checks if this connection factory is associated with a cluster of Brokers.- Specified by:
isClusterFactory
in interfaceWmConnectionFactory
- Returns:
- true if this connection factory has multiple Brokers
-
setClusterPolicy
public void setClusterPolicy(int policy) throws javax.jms.JMSException
Assign the given cluster policy to the connection factory.- Specified by:
setClusterPolicy
in interfaceWmConnectionFactory
- Parameters:
policy
-- Throws:
javax.jms.JMSException
- if the Cluster policy is not supported
-
getClusterPolicy
public int getClusterPolicy()
Gets the cluster policy assgined to this connection factory.- Specified by:
getClusterPolicy
in interfaceWmConnectionFactory
- Returns:
- cluster policy constant WmClusterPolicyManager.ROUND_ROBIN 0 WmClusterPolicyManager.STICKY 1 WmClusterPolicyManager.RANDOM 2 WmClusterPolicyManager.WEIGHTED_ROUND_ROBIN 3 WmClusterPolicyManager.MULTISEND_GUARANTEED 4 WmClusterPolicyManager.MULTISEND_BEST_EFFORT 5
-
getClusterName
public java.lang.String getClusterName()
Description copied from interface:WmConnectionFactory
Get the cluster name of the connection factory.- Specified by:
getClusterName
in interfaceWmConnectionFactory
- Returns:
- cluster name
-
setClusterPolicyName
public void setClusterPolicyName(java.lang.String policyName) throws javax.jms.JMSException
Assign the given cluster policy name to the connection factory.- Specified by:
setClusterPolicyName
in interfaceWmConnectionFactory
- Parameters:
policyName
-- Throws:
javax.jms.JMSException
- if the Cluster Policy is not supported
-
getClusterPolicyName
public java.lang.String getClusterPolicyName()
Description copied from interface:WmConnectionFactory
Get the cluster policy name of the cluster connection factory.- Specified by:
getClusterPolicyName
in interfaceWmConnectionFactory
- Returns:
- cluster policy name
-
setClusterName
public void setClusterName(java.lang.String name)
Description copied from interface:WmConnectionFactory
Set the name of the cluster for the connection factory. This will used if includeAllBrokers is true to retrieve the other Brokers in the cluster.- Specified by:
setClusterName
in interfaceWmConnectionFactory
- Parameters:
name
- Cluster name- See Also:
WmConnectionFactory.setIncludeAllBrokers(boolean)
-
getPolicyName
protected java.lang.String getPolicyName(int policy) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
setClusterRefreshInterval
public void setClusterRefreshInterval(long time)
Description copied from interface:WmConnectionFactory
Set the refresh interval for this connection factory. This is used to refresh the connections to cluster brokers if the connection factory is modified. Default interval is 24 hours if no value is specified.- Specified by:
setClusterRefreshInterval
in interfaceWmConnectionFactory
- Parameters:
time
- in minutes
-
getClusterRefreshInterval
public long getClusterRefreshInterval()
Description copied from interface:WmConnectionFactory
Get the refresh interval for this connection factory.- Specified by:
getClusterRefreshInterval
in interfaceWmConnectionFactory
- Returns:
- cluster refresh interval
-
getClusterCreationTime
public long getClusterCreationTime()
Description copied from interface:WmConnectionFactory
Get the time of creation of this cluster connection factory- Specified by:
getClusterCreationTime
in interfaceWmConnectionFactory
- Returns:
- time of creation of this factory
-
setClusterCreationTime
public void setClusterCreationTime(long creationTime)
- Specified by:
setClusterCreationTime
in interfaceWmConnectionFactory
-
getIncludeAllBrokers
public boolean getIncludeAllBrokers()
Description copied from interface:WmConnectionFactory
Get whether the include all flag is set. which would include all the brokers in the cluster- Specified by:
getIncludeAllBrokers
in interfaceWmConnectionFactory
- Returns:
- include all brokers flag
-
setIncludeAllBrokers
public void setIncludeAllBrokers(boolean includeAll)
Description copied from interface:WmConnectionFactory
Sets the flag that would include all the brokers in the cluster If the flag is set all the brokers in the cluster will be included as a part of this connection factory. Any new brokers added to cluster at a later point in time would be automatically included to the factory broker list.- Specified by:
setIncludeAllBrokers
in interfaceWmConnectionFactory
- Parameters:
includeAll
- flag to include all the brokers in the cluster.
-
getWeightedRoundRobinList
public java.util.concurrent.CopyOnWriteArrayList<WeightedRoundRobin> getWeightedRoundRobinList()
Description copied from interface:WmConnectionFactory
Get a list of WeightedRoundRobin objects for the WEIGHTED_ROUND_ROBIN policy. Each WeightedRoundRobin object encapsulates the broker URL in the cluster and the corresponding weight assigned to it for load balancing.- Specified by:
getWeightedRoundRobinList
in interfaceWmConnectionFactory
- Returns:
- List of WeightedRoundRobin objects
-
setWeightedRoundRobinList
public void setWeightedRoundRobinList(java.util.concurrent.CopyOnWriteArrayList<WeightedRoundRobin> weightedData)
Description copied from interface:WmConnectionFactory
Set a list of WeightedRoundRobin objects for the WEIGHTED_ROUND_ROBIN policy. Each WeightedRoundRobin object encapsulates the broker URL in the cluster and the corresponding weight assigned to it for load balancing.- Specified by:
setWeightedRoundRobinList
in interfaceWmConnectionFactory
- Parameters:
weightedData
- List of WeightedRoundRobin objects
-
getMultiSendCount
public int getMultiSendCount()
Description copied from interface:WmConnectionFactory
Gets the count of N brokers in cluster for MULTISEND_GUARANTEED policy The JMS provider will ensure that a message is published to N out of M brokers in the Cluster for MULTISEND_GUARANTEED. For MULTISEND_BEST_EFFORT, this value ensures a maximum of N publishes.- Specified by:
getMultiSendCount
in interfaceWmConnectionFactory
- Returns:
- the Broker count for MULTISEND_GUARANTEED policy
-
setMultiSendCount
public void setMultiSendCount(int count) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Sets the count of N brokers for MULTISEND_GUARANTEED policy The JMS provider will ensure that a message is published to N out of M brokers in the Cluster for MULTISEND_GUARANTEED. For MULTISEND_BEST_EFFORT, this value ensures a maximum of N publishes.- Specified by:
setMultiSendCount
in interfaceWmConnectionFactory
- Throws:
javax.jms.JMSException
- , if the count is less than 1 .
-
getDocSizeList
public java.util.concurrent.CopyOnWriteArrayList<DocumentSize> getDocSizeList()
- Specified by:
getDocSizeList
in interfaceWmConnectionFactory
- Returns:
- List of DocumentSize Objects
-
setDocSizeList
public void setDocSizeList(java.util.concurrent.CopyOnWriteArrayList<DocumentSize> list)
Description copied from interface:WmConnectionFactory
Sets the data for DocumentSize policy- Specified by:
setDocSizeList
in interfaceWmConnectionFactory
-
getCompositeClusterCF
public java.util.concurrent.CopyOnWriteArrayList<java.lang.String> getCompositeClusterCF()
Description copied from interface:WmConnectionFactory
Get the list of JNDI look up names for the child cluster connection factories assigned to this connection factory.- Specified by:
getCompositeClusterCF
in interfaceWmConnectionFactory
- Returns:
- List of JNDI look up names for the child cluster connection factories.
-
setCompositeClusterCF
public void setCompositeClusterCF(java.lang.String[] connectionFactories)
Description copied from interface:WmConnectionFactory
Assigns the list of child cluster connection factory names to this connection factory, which will enable it as a composite factory. The list corresponds to the JNDI look up names of the child cluster connection factories.- Specified by:
setCompositeClusterCF
in interfaceWmConnectionFactory
-
isCompositeClusterFactory
public boolean isCompositeClusterFactory()
Description copied from interface:WmConnectionFactory
Checks if this connection factory is a composite connection factory and hence associated with a list of child cluster connection factories. Composite Connection Factory will distribute messages to each of the cluster factories based on the composite cluster policy.- Specified by:
isCompositeClusterFactory
in interfaceWmConnectionFactory
- Returns:
- true if this connection factory has one or more cluster connection factories assigned to it.
-
getWeightedRoundRobinDataMap
public java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> getWeightedRoundRobinDataMap()
- Specified by:
getWeightedRoundRobinDataMap
in interfaceWmConnectionFactory
-
setWeightedRoundRobinDataMap
public void setWeightedRoundRobinDataMap(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> map)
- Specified by:
setWeightedRoundRobinDataMap
in interfaceWmConnectionFactory
-
getDocSizeDataMap
public java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> getDocSizeDataMap()
- Specified by:
getDocSizeDataMap
in interfaceWmConnectionFactory
- Returns:
- Map
-
setDocSizeDataMap
public void setDocSizeDataMap(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> map)
- Specified by:
setDocSizeDataMap
in interfaceWmConnectionFactory
-
getCompositeChildConnFactories
public java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory> getCompositeChildConnFactories()
Description copied from interface:WmConnectionFactory
Get the list of child cluster connection factory objects assigned to this connection factory. If only look up names of the child factory objects has been specified using setCompositeClusterCF() API , it would look up and return the factory objects from JNDI provider.- Specified by:
getCompositeChildConnFactories
in interfaceWmConnectionFactory
- Returns:
- List of child cluster connection factory objects
-
setCompositeChildConnFactories
public void setCompositeChildConnFactories(java.util.concurrent.CopyOnWriteArrayList<WmConnectionFactory> childConnFactories) throws javax.jms.JMSException
Description copied from interface:WmConnectionFactory
Set a list of child Cluster Connection Factory objects for this connection factory. This would enable the factory as a composite factory containing one or more child cluster factories. Each child cluster connection factory object in turn contains all the cluster broker and load balancing policy details it is governed by.- Specified by:
setCompositeChildConnFactories
in interfaceWmConnectionFactory
- Parameters:
childConnFactories
- of child cluster connection factory objects- Throws:
javax.jms.JMSException
-
getIsCompositeFactory
public boolean getIsCompositeFactory()
-
setIsCompositeFactory
public void setIsCompositeFactory(boolean compositeFactory)
-
compareConnectionFactory
public boolean compareConnectionFactory(java.lang.Object connFactory)
Define equality of connection factory state- Specified by:
compareConnectionFactory
in interfaceWmConnectionFactory
-
getPolicy
public WmClusterPolicy getPolicy() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
setClusterConnectionId
public void setClusterConnectionId(java.lang.String clusterConnectionId)
-
getClusterConnectionId
public java.lang.String getClusterConnectionId()
-
getClusterPolicyOverride
public boolean getClusterPolicyOverride()
Description copied from interface:WmConnectionFactory
Get if the user has overridden the cluster policy to enable custom stickiness.- Specified by:
getClusterPolicyOverride
in interfaceWmConnectionFactory
- Returns:
- true if this connection factory has the cluster policy overridden by user.
-
setClusterPolicyOverride
public void setClusterPolicyOverride(boolean clusterPolicyOverride)
Description copied from interface:WmConnectionFactory
Override the cluster policy to enable custom stickiness.- Specified by:
setClusterPolicyOverride
in interfaceWmConnectionFactory
-
-