org.jboss.messaging.core.client.impl
Class ClientSessionFactoryImpl
java.lang.Object
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl
- All Implemented Interfaces:
- java.io.Serializable, ClientSessionFactory, ClientSessionFactoryInternal, DiscoveryListener
public class ClientSessionFactoryImpl
- extends java.lang.Object
- implements ClientSessionFactoryInternal, DiscoveryListener, java.io.Serializable
- Version:
- $Revision: 3602 $
- Author:
- Tim Fox, Clebert Suconic, Jeff Mesnil, Andy Taylor
- See Also:
- Serialized Form
Method Summary |
void |
close()
|
void |
connectorsChanged()
|
ClientSession |
createSession()
|
ClientSession |
createSession(boolean autoCommitSends,
boolean autoCommitAcks)
|
ClientSession |
createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks)
|
ClientSession |
createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge)
|
ClientSession |
createSession(java.lang.String username,
java.lang.String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int ackBatchSize)
|
ClientSession |
createTransactedSession()
|
ClientSession |
createXASession()
|
protected void |
finalize()
|
int |
getAckBatchSize()
|
long |
getCallTimeout()
|
long |
getClientFailureCheckPeriod()
|
java.lang.String |
getConnectionLoadBalancingPolicyClassName()
|
ConnectionManager[] |
getConnectionManagers()
|
long |
getConnectionTTL()
|
int |
getConsumerMaxRate()
|
int |
getConsumerWindowSize()
|
java.lang.String |
getDiscoveryAddress()
|
long |
getDiscoveryInitialWaitTimeout()
|
int |
getDiscoveryPort()
|
long |
getDiscoveryRefreshTimeout()
|
int |
getMaxConnections()
|
int |
getMinLargeMessageSize()
|
int |
getProducerMaxRate()
|
int |
getProducerWindowSize()
|
int |
getReconnectAttempts()
|
long |
getRetryInterval()
|
double |
getRetryIntervalMultiplier()
|
int |
getScheduledThreadPoolMaxSize()
|
java.util.List<Pair<TransportConfiguration,TransportConfiguration>> |
getStaticConnectors()
|
int |
getThreadPoolMaxSize()
|
boolean |
isAutoGroup()
|
boolean |
isBlockOnAcknowledge()
|
boolean |
isBlockOnNonPersistentSend()
|
boolean |
isBlockOnPersistentSend()
|
boolean |
isFailoverOnServerShutdown()
|
boolean |
isPreAcknowledge()
|
boolean |
isUseGlobalPools()
|
int |
numConnections()
|
int |
numSessions()
|
void |
setAckBatchSize(int ackBatchSize)
|
void |
setAutoGroup(boolean autoGroup)
|
void |
setBlockOnAcknowledge(boolean blockOnAcknowledge)
|
void |
setBlockOnNonPersistentSend(boolean blockOnNonPersistentSend)
|
void |
setBlockOnPersistentSend(boolean blockOnPersistentSend)
|
void |
setCallTimeout(long callTimeout)
|
void |
setClientFailureCheckPeriod(long clientFailureCheckPeriod)
|
void |
setConnectionLoadBalancingPolicyClassName(java.lang.String loadBalancingPolicyClassName)
|
void |
setConnectionTTL(long connectionTTL)
|
void |
setConsumerMaxRate(int consumerMaxRate)
|
void |
setConsumerWindowSize(int consumerWindowSize)
|
void |
setDiscoveryAddress(java.lang.String discoveryAddress)
|
void |
setDiscoveryInitialWaitTimeout(long initialWaitTimeout)
|
void |
setDiscoveryPort(int discoveryPort)
|
void |
setDiscoveryRefreshTimeout(long discoveryRefreshTimeout)
|
void |
setFailoverOnServerShutdown(boolean failoverOnServerShutdown)
|
void |
setMaxConnections(int maxConnections)
|
void |
setMinLargeMessageSize(int minLargeMessageSize)
|
void |
setPreAcknowledge(boolean preAcknowledge)
|
void |
setProducerMaxRate(int producerMaxRate)
|
void |
setProducerWindowSize(int producerWindowSize)
|
void |
setReconnectAttempts(int reconnectAttempts)
|
void |
setRetryInterval(long retryInterval)
|
void |
setRetryIntervalMultiplier(double retryIntervalMultiplier)
|
void |
setScheduledThreadPoolMaxSize(int scheduledThreadPoolMaxSize)
|
void |
setStaticConnectors(java.util.List<Pair<TransportConfiguration,TransportConfiguration>> staticConnectors)
|
void |
setThreadPoolMaxSize(int threadPoolMaxSize)
|
void |
setUseGlobalPools(boolean useGlobalPools)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME
public static final java.lang.String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME
- See Also:
- Constant Field Values
DEFAULT_CLIENT_FAILURE_CHECK_PERIOD
public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD
- See Also:
- Constant Field Values
DEFAULT_CONNECTION_TTL
public static final long DEFAULT_CONNECTION_TTL
- See Also:
- Constant Field Values
DEFAULT_MIN_LARGE_MESSAGE_SIZE
public static final int DEFAULT_MIN_LARGE_MESSAGE_SIZE
- See Also:
- Constant Field Values
DEFAULT_CONSUMER_WINDOW_SIZE
public static final int DEFAULT_CONSUMER_WINDOW_SIZE
- See Also:
- Constant Field Values
DEFAULT_CONSUMER_MAX_RATE
public static final int DEFAULT_CONSUMER_MAX_RATE
- See Also:
- Constant Field Values
DEFAULT_PRODUCER_WINDOW_SIZE
public static final int DEFAULT_PRODUCER_WINDOW_SIZE
- See Also:
- Constant Field Values
DEFAULT_PRODUCER_MAX_RATE
public static final int DEFAULT_PRODUCER_MAX_RATE
- See Also:
- Constant Field Values
DEFAULT_BLOCK_ON_ACKNOWLEDGE
public static final boolean DEFAULT_BLOCK_ON_ACKNOWLEDGE
- See Also:
- Constant Field Values
DEFAULT_BLOCK_ON_PERSISTENT_SEND
public static final boolean DEFAULT_BLOCK_ON_PERSISTENT_SEND
- See Also:
- Constant Field Values
DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND
public static final boolean DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND
- See Also:
- Constant Field Values
DEFAULT_AUTO_GROUP
public static final boolean DEFAULT_AUTO_GROUP
- See Also:
- Constant Field Values
DEFAULT_CALL_TIMEOUT
public static final long DEFAULT_CALL_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS
- See Also:
- Constant Field Values
DEFAULT_ACK_BATCH_SIZE
public static final int DEFAULT_ACK_BATCH_SIZE
- See Also:
- Constant Field Values
DEFAULT_PRE_ACKNOWLEDGE
public static final boolean DEFAULT_PRE_ACKNOWLEDGE
- See Also:
- Constant Field Values
DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT
public static final long DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_DISCOVERY_REFRESH_TIMEOUT
public static final long DEFAULT_DISCOVERY_REFRESH_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_RETRY_INTERVAL
public static final long DEFAULT_RETRY_INTERVAL
- See Also:
- Constant Field Values
DEFAULT_RETRY_INTERVAL_MULTIPLIER
public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER
- See Also:
- Constant Field Values
DEFAULT_RECONNECT_ATTEMPTS
public static final int DEFAULT_RECONNECT_ATTEMPTS
- See Also:
- Constant Field Values
DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN
public static final boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN
- See Also:
- Constant Field Values
DEFAULT_USE_GLOBAL_POOLS
public static final boolean DEFAULT_USE_GLOBAL_POOLS
- See Also:
- Constant Field Values
DEFAULT_THREAD_POOL_MAX_SIZE
public static final int DEFAULT_THREAD_POOL_MAX_SIZE
- See Also:
- Constant Field Values
DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE
public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE
- See Also:
- Constant Field Values
ClientSessionFactoryImpl
public ClientSessionFactoryImpl()
ClientSessionFactoryImpl
public ClientSessionFactoryImpl(java.lang.String discoveryAddress,
int discoveryPort)
ClientSessionFactoryImpl
public ClientSessionFactoryImpl(java.util.List<Pair<TransportConfiguration,TransportConfiguration>> staticConnectors)
ClientSessionFactoryImpl
public ClientSessionFactoryImpl(TransportConfiguration connectorConfig,
TransportConfiguration backupConnectorConfig)
ClientSessionFactoryImpl
public ClientSessionFactoryImpl(TransportConfiguration connectorConfig)
getStaticConnectors
public java.util.List<Pair<TransportConfiguration,TransportConfiguration>> getStaticConnectors()
- Specified by:
getStaticConnectors
in interface ClientSessionFactory
setStaticConnectors
public void setStaticConnectors(java.util.List<Pair<TransportConfiguration,TransportConfiguration>> staticConnectors)
- Specified by:
setStaticConnectors
in interface ClientSessionFactory
getClientFailureCheckPeriod
public long getClientFailureCheckPeriod()
- Specified by:
getClientFailureCheckPeriod
in interface ClientSessionFactory
setClientFailureCheckPeriod
public void setClientFailureCheckPeriod(long clientFailureCheckPeriod)
- Specified by:
setClientFailureCheckPeriod
in interface ClientSessionFactory
getConnectionTTL
public long getConnectionTTL()
- Specified by:
getConnectionTTL
in interface ClientSessionFactory
setConnectionTTL
public void setConnectionTTL(long connectionTTL)
- Specified by:
setConnectionTTL
in interface ClientSessionFactory
getCallTimeout
public long getCallTimeout()
- Specified by:
getCallTimeout
in interface ClientSessionFactory
setCallTimeout
public void setCallTimeout(long callTimeout)
- Specified by:
setCallTimeout
in interface ClientSessionFactory
getMaxConnections
public int getMaxConnections()
- Specified by:
getMaxConnections
in interface ClientSessionFactory
setMaxConnections
public void setMaxConnections(int maxConnections)
- Specified by:
setMaxConnections
in interface ClientSessionFactory
getMinLargeMessageSize
public int getMinLargeMessageSize()
- Specified by:
getMinLargeMessageSize
in interface ClientSessionFactory
setMinLargeMessageSize
public void setMinLargeMessageSize(int minLargeMessageSize)
- Specified by:
setMinLargeMessageSize
in interface ClientSessionFactory
getConsumerWindowSize
public int getConsumerWindowSize()
- Specified by:
getConsumerWindowSize
in interface ClientSessionFactory
setConsumerWindowSize
public void setConsumerWindowSize(int consumerWindowSize)
- Specified by:
setConsumerWindowSize
in interface ClientSessionFactory
getConsumerMaxRate
public int getConsumerMaxRate()
- Specified by:
getConsumerMaxRate
in interface ClientSessionFactory
setConsumerMaxRate
public void setConsumerMaxRate(int consumerMaxRate)
- Specified by:
setConsumerMaxRate
in interface ClientSessionFactory
getProducerWindowSize
public int getProducerWindowSize()
- Specified by:
getProducerWindowSize
in interface ClientSessionFactory
setProducerWindowSize
public void setProducerWindowSize(int producerWindowSize)
- Specified by:
setProducerWindowSize
in interface ClientSessionFactory
getProducerMaxRate
public int getProducerMaxRate()
- Specified by:
getProducerMaxRate
in interface ClientSessionFactory
setProducerMaxRate
public void setProducerMaxRate(int producerMaxRate)
- Specified by:
setProducerMaxRate
in interface ClientSessionFactory
isBlockOnAcknowledge
public boolean isBlockOnAcknowledge()
- Specified by:
isBlockOnAcknowledge
in interface ClientSessionFactory
setBlockOnAcknowledge
public void setBlockOnAcknowledge(boolean blockOnAcknowledge)
- Specified by:
setBlockOnAcknowledge
in interface ClientSessionFactory
isBlockOnPersistentSend
public boolean isBlockOnPersistentSend()
- Specified by:
isBlockOnPersistentSend
in interface ClientSessionFactory
setBlockOnPersistentSend
public void setBlockOnPersistentSend(boolean blockOnPersistentSend)
- Specified by:
setBlockOnPersistentSend
in interface ClientSessionFactory
isBlockOnNonPersistentSend
public boolean isBlockOnNonPersistentSend()
- Specified by:
isBlockOnNonPersistentSend
in interface ClientSessionFactory
setBlockOnNonPersistentSend
public void setBlockOnNonPersistentSend(boolean blockOnNonPersistentSend)
- Specified by:
setBlockOnNonPersistentSend
in interface ClientSessionFactory
isAutoGroup
public boolean isAutoGroup()
- Specified by:
isAutoGroup
in interface ClientSessionFactory
setAutoGroup
public void setAutoGroup(boolean autoGroup)
- Specified by:
setAutoGroup
in interface ClientSessionFactory
isPreAcknowledge
public boolean isPreAcknowledge()
- Specified by:
isPreAcknowledge
in interface ClientSessionFactory
setPreAcknowledge
public void setPreAcknowledge(boolean preAcknowledge)
- Specified by:
setPreAcknowledge
in interface ClientSessionFactory
getAckBatchSize
public int getAckBatchSize()
- Specified by:
getAckBatchSize
in interface ClientSessionFactory
setAckBatchSize
public void setAckBatchSize(int ackBatchSize)
- Specified by:
setAckBatchSize
in interface ClientSessionFactory
getDiscoveryInitialWaitTimeout
public long getDiscoveryInitialWaitTimeout()
- Specified by:
getDiscoveryInitialWaitTimeout
in interface ClientSessionFactory
setDiscoveryInitialWaitTimeout
public void setDiscoveryInitialWaitTimeout(long initialWaitTimeout)
- Specified by:
setDiscoveryInitialWaitTimeout
in interface ClientSessionFactory
isUseGlobalPools
public boolean isUseGlobalPools()
- Specified by:
isUseGlobalPools
in interface ClientSessionFactory
setUseGlobalPools
public void setUseGlobalPools(boolean useGlobalPools)
- Specified by:
setUseGlobalPools
in interface ClientSessionFactory
getScheduledThreadPoolMaxSize
public int getScheduledThreadPoolMaxSize()
- Specified by:
getScheduledThreadPoolMaxSize
in interface ClientSessionFactory
setScheduledThreadPoolMaxSize
public void setScheduledThreadPoolMaxSize(int scheduledThreadPoolMaxSize)
- Specified by:
setScheduledThreadPoolMaxSize
in interface ClientSessionFactory
getThreadPoolMaxSize
public int getThreadPoolMaxSize()
- Specified by:
getThreadPoolMaxSize
in interface ClientSessionFactory
setThreadPoolMaxSize
public void setThreadPoolMaxSize(int threadPoolMaxSize)
- Specified by:
setThreadPoolMaxSize
in interface ClientSessionFactory
getRetryInterval
public long getRetryInterval()
- Specified by:
getRetryInterval
in interface ClientSessionFactory
setRetryInterval
public void setRetryInterval(long retryInterval)
- Specified by:
setRetryInterval
in interface ClientSessionFactory
getRetryIntervalMultiplier
public double getRetryIntervalMultiplier()
- Specified by:
getRetryIntervalMultiplier
in interface ClientSessionFactory
setRetryIntervalMultiplier
public void setRetryIntervalMultiplier(double retryIntervalMultiplier)
- Specified by:
setRetryIntervalMultiplier
in interface ClientSessionFactory
getReconnectAttempts
public int getReconnectAttempts()
- Specified by:
getReconnectAttempts
in interface ClientSessionFactory
setReconnectAttempts
public void setReconnectAttempts(int reconnectAttempts)
- Specified by:
setReconnectAttempts
in interface ClientSessionFactory
isFailoverOnServerShutdown
public boolean isFailoverOnServerShutdown()
- Specified by:
isFailoverOnServerShutdown
in interface ClientSessionFactory
setFailoverOnServerShutdown
public void setFailoverOnServerShutdown(boolean failoverOnServerShutdown)
- Specified by:
setFailoverOnServerShutdown
in interface ClientSessionFactory
getConnectionLoadBalancingPolicyClassName
public java.lang.String getConnectionLoadBalancingPolicyClassName()
- Specified by:
getConnectionLoadBalancingPolicyClassName
in interface ClientSessionFactory
setConnectionLoadBalancingPolicyClassName
public void setConnectionLoadBalancingPolicyClassName(java.lang.String loadBalancingPolicyClassName)
- Specified by:
setConnectionLoadBalancingPolicyClassName
in interface ClientSessionFactory
getDiscoveryAddress
public java.lang.String getDiscoveryAddress()
- Specified by:
getDiscoveryAddress
in interface ClientSessionFactory
setDiscoveryAddress
public void setDiscoveryAddress(java.lang.String discoveryAddress)
- Specified by:
setDiscoveryAddress
in interface ClientSessionFactory
getDiscoveryPort
public int getDiscoveryPort()
- Specified by:
getDiscoveryPort
in interface ClientSessionFactory
setDiscoveryPort
public void setDiscoveryPort(int discoveryPort)
- Specified by:
setDiscoveryPort
in interface ClientSessionFactory
getDiscoveryRefreshTimeout
public long getDiscoveryRefreshTimeout()
- Specified by:
getDiscoveryRefreshTimeout
in interface ClientSessionFactory
setDiscoveryRefreshTimeout
public void setDiscoveryRefreshTimeout(long discoveryRefreshTimeout)
- Specified by:
setDiscoveryRefreshTimeout
in interface ClientSessionFactory
createSession
public ClientSession createSession(java.lang.String username,
java.lang.String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int ackBatchSize)
throws MessagingException
- Specified by:
createSession
in interface ClientSessionFactory
- Throws:
MessagingException
createXASession
public ClientSession createXASession()
throws MessagingException
- Specified by:
createXASession
in interface ClientSessionFactory
- Throws:
MessagingException
createTransactedSession
public ClientSession createTransactedSession()
throws MessagingException
- Specified by:
createTransactedSession
in interface ClientSessionFactory
- Throws:
MessagingException
createSession
public ClientSession createSession()
throws MessagingException
- Specified by:
createSession
in interface ClientSessionFactory
- Throws:
MessagingException
createSession
public ClientSession createSession(boolean autoCommitSends,
boolean autoCommitAcks)
throws MessagingException
- Specified by:
createSession
in interface ClientSessionFactory
- Throws:
MessagingException
createSession
public ClientSession createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks)
throws MessagingException
- Specified by:
createSession
in interface ClientSessionFactory
- Throws:
MessagingException
createSession
public ClientSession createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge)
throws MessagingException
- Specified by:
createSession
in interface ClientSessionFactory
- Throws:
MessagingException
numSessions
public int numSessions()
- Specified by:
numSessions
in interface ClientSessionFactoryInternal
numConnections
public int numConnections()
- Specified by:
numConnections
in interface ClientSessionFactoryInternal
close
public void close()
- Specified by:
close
in interface ClientSessionFactory
connectorsChanged
public void connectorsChanged()
- Specified by:
connectorsChanged
in interface DiscoveryListener
getConnectionManagers
public ConnectionManager[] getConnectionManagers()
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
Copyright © 2006 JBoss Inc. All Rights Reserved.