activemq::core::ActiveMQConnectionFactory Class Reference

#include <src/main/activemq/core/ActiveMQConnectionFactory.h>

Inheritance diagram for activemq::core::ActiveMQConnectionFactory:
Inheritance graph
[legend]

Public Member Functions

 ActiveMQConnectionFactory ()
 ActiveMQConnectionFactory (const std::string &uri, const std::string &username="", const std::string &password="")
 Constructor.
 ActiveMQConnectionFactory (const decaf::net::URI &uri, const std::string &username="", const std::string &password="")
 Constructor.
virtual ~ActiveMQConnectionFactory ()
virtual cms::ConnectioncreateConnection ()
 Creates a connection with the default user identity.
virtual cms::ConnectioncreateConnection (const std::string &username, const std::string &password)
 Creates a connection with the specified user identity.
virtual cms::ConnectioncreateConnection (const std::string &username, const std::string &password, const std::string &clientId)
 Creates a connection with the specified user identity.
void setUsername (const std::string &username)
 Sets the username that should be used when creating a new connection.
const std::string & getUsername () const
 Gets the username that this factory will use when creating a new connection instance.
void setPassword (const std::string &password)
 Sets the password that should be used when creating a new connection.
const std::string & getPassword () const
 Gets the password that this factory will use when creating a new connection instance.
std::string getClientId () const
 Gets the Configured Client Id.
void setClientId (const std::string &clientId)
 Sets the Client Id.
void setBrokerURI (const std::string &uri)
 Sets the Broker URI that should be used when creating a new connection instance.
void setBrokerURI (const decaf::net::URI &uri)
 Sets the Broker URI that should be used when creating a new connection instance.
const decaf::net::URIgetBrokerURI () const
 Gets the Broker URI that this factory will use when creating a new connection instance.
virtual void setExceptionListener (cms::ExceptionListener *listener)
 Set an CMS ExceptionListener that will be set on eat connection once it has been created.
virtual cms::ExceptionListenergetExceptionListener () const
 Returns the currently set ExceptionListener that will be set on any new Connection instance that is created by this factory.
virtual void setMessageTransformer (cms::MessageTransformer *transformer)
 Set an MessageTransformer instance that is passed on to all Connection objects created from this ConnectionFactory.
virtual cms::MessageTransformergetMessageTransformer () const
 Gets the currently configured MessageTransformer for this ConnectionFactory.
void setPrefetchPolicy (PrefetchPolicy *policy)
 Sets the PrefetchPolicy instance that this factory should use when it creates new Connection instances.
PrefetchPolicygetPrefetchPolicy () const
 Gets the pointer to the current PrefetchPolicy that is in use by this ConnectionFactory.
void setRedeliveryPolicy (RedeliveryPolicy *policy)
 Sets the RedeliveryPolicy instance that this factory should use when it creates new Connection instances.
RedeliveryPolicygetRedeliveryPolicy () const
 Gets the pointer to the current RedeliveryPolicy that is in use by this ConnectionFactory.
bool isDispatchAsync () const
void setDispatchAsync (bool value)
 Should messages be dispatched synchronously or asynchronously from the producer thread for non-durable topics in the broker? For fast consumers set this to false.
bool isAlwaysSyncSend () const
 Gets if the Connection should always send things Synchronously.
void setAlwaysSyncSend (bool value)
 Sets if the Connection should always send things Synchronously.
bool isUseAsyncSend () const
 Gets if the useAsyncSend option is set.
void setUseAsyncSend (bool value)
 Sets the useAsyncSend option.
bool isSendAcksAsync () const
 Returns whether Message acknowledgments are sent asynchronously meaning no response is required from the broker before the ack completes.
void setSendAcksAsync (bool sendAcksAsync)
 Sets whether Message acknowledgments are sent asynchronously meaning no response is required from the broker before the ack completes.
bool isUseCompression () const
 Gets if the Connection is configured for Message body compression.
void setUseCompression (bool value)
 Sets whether Message body compression is enabled.
void setCompressionLevel (int value)
 Sets the Compression level used when Message body compression is enabled, a value of -1 causes the Compression Library to use the default setting which is a balance of speed and compression.
int getCompressionLevel () const
 Gets the currently configured Compression level for Message bodies.
unsigned int getSendTimeout () const
 Gets the assigned send timeout for this Connector.
void setSendTimeout (unsigned int timeout)
 Sets the send timeout to use when sending Message objects, this will cause all messages to be sent using a Synchronous request is non-zero.
unsigned int getCloseTimeout () const
 Gets the assigned close timeout for this Connector.
void setCloseTimeout (unsigned int timeout)
 Sets the close timeout to use when sending the disconnect request.
unsigned int getProducerWindowSize () const
 Gets the configured producer window size for Producers that are created from this connector.
void setProducerWindowSize (unsigned int windowSize)
 Sets the size in Bytes of messages that a producer can send before it is blocked to await a ProducerAck from the broker that frees enough memory to allow another message to be sent.
bool isMessagePrioritySupported () const
void setMessagePrioritySupported (bool value)
 Set whether or not this factory should create Connection objects with the Message priority support function enabled.
bool isUseRetroactiveConsumer () const
 Should all created consumers be retroactive.
void setUseRetroactiveConsumer (bool useRetroactiveConsumer)
 Sets whether or not retroactive consumers are enabled.
bool isExclusiveConsumer () const
 Should all created consumers be exclusive.
void setExclusiveConsumer (bool exclusiveConsumer)
 Enables or disables whether or not queue consumers should be exclusive or not for example to preserve ordering when not using Message Groups.
bool isWatchTopicAdvisories () const
 Is the Connection created by this factory configured to watch for advisory messages that inform the Connection about temporary destination create / destroy.
void setWatchTopicAdvisories (bool value)
 Sets whether Connection's created by this factory will listen for advisory messages regarding temporary destination creation and deletion.
int getAuditDepth () const
 Get the audit depth for Messages for consumers when using a fault tolerant transport.
void setAuditDepth (int auditDepth)
 Set the audit depth for Messages for consumers when using a fault tolerant transport.
int getAuditMaximumProducerNumber () const
 The number of Producers that will be audited.
void setAuditMaximumProducerNumber (int auditMaximumProducerNumber)
 The number of Producers that will be audited.
bool isCheckForDuplicates () const
 Gets the value of the configured Duplicate Message detection feature.
void setCheckForDuplicates (bool checkForDuplicates)
 Gets the value of the configured Duplicate Message detection feature.
bool isTransactedIndividualAck () const
 when true, submit individual transacted acks immediately rather than with transaction completion.
void setTransactedIndividualAck (bool transactedIndividualAck)
 when true, submit individual transacted acks immediately rather than with transaction completion.
bool isNonBlockingRedelivery () const
 Returns true if non-blocking redelivery of Messages is configured for Consumers that are rolled back or recovered.
void setNonBlockingRedelivery (bool nonBlockingRedelivery)
 When true a MessageConsumer will not stop Message delivery before re-delivering Messages from a rolled back transaction.
long long getConsumerFailoverRedeliveryWaitPeriod () const
 Gets the delay period for a consumer redelivery.
void setConsumerFailoverRedeliveryWaitPeriod (long long value)
 Sets the delay period for a consumer redelivery.
bool isOptimizeAcknowledge () const
void setOptimizeAcknowledge (bool optimizeAcknowledge)
 Sets if Consumers are configured to use Optimized Acknowledge by default.
long long getOptimizeAcknowledgeTimeOut () const
 Gets the time between optimized ack batches in milliseconds.
void setOptimizeAcknowledgeTimeOut (long long optimizeAcknowledgeTimeOut)
 The max time in milliseconds between optimized ack batches.
long long getOptimizedAckScheduledAckInterval () const
 Gets the configured time interval that is used to force all MessageConsumers that have optimizedAcknowledge enabled to send an ack for any outstanding Message Acks.
void setOptimizedAckScheduledAckInterval (long long optimizedAckScheduledAckInterval)
 Sets the amount of time between scheduled sends of any outstanding Message Acks for consumers that have been configured with optimizeAcknowledge enabled.

Static Public Member Functions

static cms::ConnectioncreateConnection (const std::string &uri, const std::string &username, const std::string &password, const std::string &clientId="")
 Creates a connection with the specified user identity.

Static Public Attributes

static const std::string DEFAULT_URI

Protected Member Functions

virtual ActiveMQConnectioncreateActiveMQConnection (const Pointer< transport::Transport > &transport, const Pointer< decaf::util::Properties > &properties)
 Create a new ActiveMQConnection instnace using the provided Transport and Properties.

Constructor & Destructor Documentation

activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory (  ) 
activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory ( const std::string &  uri,
const std::string &  username = "",
const std::string &  password = "" 
)

Constructor.

Parameters:
uri The URI of the Broker we are connecting to.
username The user name to authenticate with this connection.
password The password to authenticate with this connection.
activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory ( const decaf::net::URI uri,
const std::string &  username = "",
const std::string &  password = "" 
)

Constructor.

Parameters:
uri The URI of the Broker we are connecting to.
username The user name to authenticate with this connection.
password The password to authenticate with this connection.
virtual activemq::core::ActiveMQConnectionFactory::~ActiveMQConnectionFactory (  )  [virtual]

Member Function Documentation

virtual ActiveMQConnection* activemq::core::ActiveMQConnectionFactory::createActiveMQConnection ( const Pointer< transport::Transport > &  transport,
const Pointer< decaf::util::Properties > &  properties 
) [protected, virtual]

Create a new ActiveMQConnection instnace using the provided Transport and Properties.

Subclasses can override this to control the actual type of ActiveMQConnection that is created.

Parameters:
transport The Transport that the Connection should use to communicate with the Broker.
properties The Properties that are assigned to the new Connection instance.
Returns:
a new ActiveMQConnection pointer instance.

Reimplemented in activemq::core::ActiveMQXAConnectionFactory.

static cms::Connection* activemq::core::ActiveMQConnectionFactory::createConnection ( const std::string &  uri,
const std::string &  username,
const std::string &  password,
const std::string &  clientId = "" 
) [static]

Creates a connection with the specified user identity.

The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters:
uri The URI of the Broker we are connecting to.
username The name of the user to authenticate with.
password The password for the user to authenticate with.
clientId The unique client id to assign to connection, defaults to "".
Exceptions:
CMSException. 
virtual cms::Connection* activemq::core::ActiveMQConnectionFactory::createConnection ( const std::string &  username,
const std::string &  password,
const std::string &  clientId 
) [virtual]

Creates a connection with the specified user identity.

The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called. The username and password values passed here do not change the defaults, subsequent calls to the parameterless createConnection will continue to use the default values that were set in the Constructor.

Parameters:
username The user name to authenticate with this connection.
password The password to authenticate with this connection.
clientId The client Id to assign to connection if "" then a random client Id is created for this connection.
Returns:
a Connection Pointer
Exceptions:
CMSSecurityException if the user credentials are invalid.
CMSException if an error occurs.

Implements cms::ConnectionFactory.

virtual cms::Connection* activemq::core::ActiveMQConnectionFactory::createConnection ( const std::string &  username,
const std::string &  password 
) [virtual]

Creates a connection with the specified user identity.

The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called. The user name and password values passed here do not change the defaults, subsequent calls to the parameterless createConnection will continue to use the default values that were set in the Constructor.

Parameters:
username The user name to authenticate with this connection.
password The password to authenticate with this connection.
Returns:
a Connection Pointer
Exceptions:
CMSSecurityException if the user credentials are invalid.
CMSException if an error occurs.

Implements cms::ConnectionFactory.

virtual cms::Connection* activemq::core::ActiveMQConnectionFactory::createConnection (  )  [virtual]

Creates a connection with the default user identity.

The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Returns:
a Connection Pointer
Exceptions:
CMSException if an error occurs.

Implements cms::ConnectionFactory.

int activemq::core::ActiveMQConnectionFactory::getAuditDepth (  )  const

Get the audit depth for Messages for consumers when using a fault tolerant transport.

The higher the value the more messages are checked for duplication, and the larger the performance impact of duplicate detection will be.

Returns:
the configured audit depth.
int activemq::core::ActiveMQConnectionFactory::getAuditMaximumProducerNumber (  )  const

The number of Producers that will be audited.

Returns:
the configured number of producers to include in the audit.
const decaf::net::URI& activemq::core::ActiveMQConnectionFactory::getBrokerURI (  )  const

Gets the Broker URI that this factory will use when creating a new connection instance.

Returns:
brokerURI string
std::string activemq::core::ActiveMQConnectionFactory::getClientId (  )  const

Gets the Configured Client Id.

Returns:
the clientId.
unsigned int activemq::core::ActiveMQConnectionFactory::getCloseTimeout (  )  const

Gets the assigned close timeout for this Connector.

Returns:
the close timeout configured in the connection uri
int activemq::core::ActiveMQConnectionFactory::getCompressionLevel (  )  const

Gets the currently configured Compression level for Message bodies.

Returns:
the int value of the current compression level.
long long activemq::core::ActiveMQConnectionFactory::getConsumerFailoverRedeliveryWaitPeriod (  )  const

Gets the delay period for a consumer redelivery.

Returns:
configured time delay in milliseconds.
virtual cms::ExceptionListener* activemq::core::ActiveMQConnectionFactory::getExceptionListener (  )  const [virtual]

Returns the currently set ExceptionListener that will be set on any new Connection instance that is created by this factory.

Returns:
a pointer to a CMS ExceptionListener instance or NULL if not set.

Implements cms::ConnectionFactory.

virtual cms::MessageTransformer* activemq::core::ActiveMQConnectionFactory::getMessageTransformer (  )  const [virtual]

Gets the currently configured MessageTransformer for this ConnectionFactory.

Returns:
the pointer to the currently set cms::MessageTransformer.

Implements cms::ConnectionFactory.

long long activemq::core::ActiveMQConnectionFactory::getOptimizeAcknowledgeTimeOut (  )  const

Gets the time between optimized ack batches in milliseconds.

Returns:
time between optimized ack batches in Milliseconds.
long long activemq::core::ActiveMQConnectionFactory::getOptimizedAckScheduledAckInterval (  )  const

Gets the configured time interval that is used to force all MessageConsumers that have optimizedAcknowledge enabled to send an ack for any outstanding Message Acks.

By default this value is set to zero meaning that the consumers will not do any background Message acknowledgment.

Returns:
the scheduledOptimizedAckInterval
const std::string& activemq::core::ActiveMQConnectionFactory::getPassword (  )  const

Gets the password that this factory will use when creating a new connection instance.

Returns:
password string, "" for default credentials
PrefetchPolicy* activemq::core::ActiveMQConnectionFactory::getPrefetchPolicy (  )  const

Gets the pointer to the current PrefetchPolicy that is in use by this ConnectionFactory.

Returns:
a pointer to this objects PrefetchPolicy.
unsigned int activemq::core::ActiveMQConnectionFactory::getProducerWindowSize (  )  const

Gets the configured producer window size for Producers that are created from this connector.

This only applies if there is no send timeout and the producer is able to send asynchronously.

Returns:
size in bytes of messages that this producer can produce before it must block and wait for ProducerAck messages to free resources.
RedeliveryPolicy* activemq::core::ActiveMQConnectionFactory::getRedeliveryPolicy (  )  const

Gets the pointer to the current RedeliveryPolicy that is in use by this ConnectionFactory.

Returns:
a pointer to this objects RedeliveryPolicy.
unsigned int activemq::core::ActiveMQConnectionFactory::getSendTimeout (  )  const

Gets the assigned send timeout for this Connector.

Returns:
the send timeout configured in the connection uri
const std::string& activemq::core::ActiveMQConnectionFactory::getUsername (  )  const

Gets the username that this factory will use when creating a new connection instance.

Returns:
username string, "" for default credentials
bool activemq::core::ActiveMQConnectionFactory::isAlwaysSyncSend (  )  const

Gets if the Connection should always send things Synchronously.

Returns:
true if sends should always be Synchronous.
bool activemq::core::ActiveMQConnectionFactory::isCheckForDuplicates (  )  const

Gets the value of the configured Duplicate Message detection feature.

When enabled and a fault tolerant transport is used (think failover) then this feature will help to detect and filter duplicate messages that might otherwise be delivered to a consumer after a connection failure.

Disabling this can increase performance since no Message auditing will occur.

Returns:
the checkForDuplicates value currently set.
bool activemq::core::ActiveMQConnectionFactory::isDispatchAsync (  )  const
Returns:
The value of the dispatch asynchronously option sent to the broker.
bool activemq::core::ActiveMQConnectionFactory::isExclusiveConsumer (  )  const

Should all created consumers be exclusive.

Returns:
true if consumer will be created with the exclusive flag set.
bool activemq::core::ActiveMQConnectionFactory::isMessagePrioritySupported (  )  const
Returns:
true if the Connections that this factory creates should support the message based priority settings.
bool activemq::core::ActiveMQConnectionFactory::isNonBlockingRedelivery (  )  const

Returns true if non-blocking redelivery of Messages is configured for Consumers that are rolled back or recovered.

Returns:
true if non-blocking redelivery is enabled.
bool activemq::core::ActiveMQConnectionFactory::isOptimizeAcknowledge (  )  const
Returns:
true if optimizeAcknowledge is enabled.
bool activemq::core::ActiveMQConnectionFactory::isSendAcksAsync (  )  const

Returns whether Message acknowledgments are sent asynchronously meaning no response is required from the broker before the ack completes.

Returns:
the sendAcksAsync configured value. (defaults to true)
bool activemq::core::ActiveMQConnectionFactory::isTransactedIndividualAck (  )  const

when true, submit individual transacted acks immediately rather than with transaction completion.

This allows the acks to represent delivery status which can be persisted on rollback Used in conjunction with KahaDB set to Rewrite On Redelivery.

Returns:
true if this option is enabled.
bool activemq::core::ActiveMQConnectionFactory::isUseAsyncSend (  )  const

Gets if the useAsyncSend option is set.

Returns:
true if on false if not.
bool activemq::core::ActiveMQConnectionFactory::isUseCompression (  )  const

Gets if the Connection is configured for Message body compression.

Returns:
if the Message body will be Compressed or not.
bool activemq::core::ActiveMQConnectionFactory::isUseRetroactiveConsumer (  )  const

Should all created consumers be retroactive.

Returns:
true if consumer will be created with the retroactive flag set.
bool activemq::core::ActiveMQConnectionFactory::isWatchTopicAdvisories (  )  const

Is the Connection created by this factory configured to watch for advisory messages that inform the Connection about temporary destination create / destroy.

Returns:
true if Connection's will listen for temporary destination advisory messages.
void activemq::core::ActiveMQConnectionFactory::setAlwaysSyncSend ( bool  value  ) 

Sets if the Connection should always send things Synchronously.

Parameters:
value true if sends should always be Synchronous.
void activemq::core::ActiveMQConnectionFactory::setAuditDepth ( int  auditDepth  ) 

Set the audit depth for Messages for consumers when using a fault tolerant transport.

The higher the value the more messages are checked for duplication, and the larger the performance impact of duplicate detection will be.

Parameters:
auditDepth The configured audit depth.
void activemq::core::ActiveMQConnectionFactory::setAuditMaximumProducerNumber ( int  auditMaximumProducerNumber  ) 

The number of Producers that will be audited.

Parameters:
auditMaximumProducerNumber The configured number of producers to include in the audit.
void activemq::core::ActiveMQConnectionFactory::setBrokerURI ( const decaf::net::URI uri  ) 

Sets the Broker URI that should be used when creating a new connection instance.

Parameters:
brokerURI The URI of the broker that this client will connect to.
void activemq::core::ActiveMQConnectionFactory::setBrokerURI ( const std::string &  uri  ) 

Sets the Broker URI that should be used when creating a new connection instance.

Parameters:
brokerURI The string form of the Broker URI, this will be converted to a URI object.
void activemq::core::ActiveMQConnectionFactory::setCheckForDuplicates ( bool  checkForDuplicates  ) 

Gets the value of the configured Duplicate Message detection feature.

When enabled and a fault tolerant transport is used (think failover) then this feature will help to detect and filter duplicate messages that might otherwise be delivered to a consumer after a connection failure.

Disabling this can increase performance since no Message auditing will occur.

Parameters:
checkForDuplicates The checkForDuplicates value to be configured.
void activemq::core::ActiveMQConnectionFactory::setClientId ( const std::string &  clientId  ) 

Sets the Client Id.

Parameters:
clientId - The new clientId value.
void activemq::core::ActiveMQConnectionFactory::setCloseTimeout ( unsigned int  timeout  ) 

Sets the close timeout to use when sending the disconnect request.

Parameters:
timeout - The time to wait for a close message.
void activemq::core::ActiveMQConnectionFactory::setCompressionLevel ( int  value  ) 

Sets the Compression level used when Message body compression is enabled, a value of -1 causes the Compression Library to use the default setting which is a balance of speed and compression.

The range of compression levels is [0..9] where 0 indicates best speed and 9 indicates best compression.

Parameters:
value A signed int value that controls the compression level.
void activemq::core::ActiveMQConnectionFactory::setConsumerFailoverRedeliveryWaitPeriod ( long long  value  ) 

Sets the delay period for a consumer redelivery.

Parameters:
value The configured time delay in milliseconds.
void activemq::core::ActiveMQConnectionFactory::setDispatchAsync ( bool  value  ) 

Should messages be dispatched synchronously or asynchronously from the producer thread for non-durable topics in the broker? For fast consumers set this to false.

For slow consumers set it to true so that dispatching will not block fast consumers. .

Parameters:
value The value of the dispatch asynchronously option sent to the broker.
virtual void activemq::core::ActiveMQConnectionFactory::setExceptionListener ( cms::ExceptionListener listener  )  [virtual]

Set an CMS ExceptionListener that will be set on eat connection once it has been created.

The factory does not take ownership of this pointer, the client must ensure that its lifetime is scoped to the connection that it is applied to.

Parameters:
listener The listener to set on the connection or NULL for no listener.

Implements cms::ConnectionFactory.

void activemq::core::ActiveMQConnectionFactory::setExclusiveConsumer ( bool  exclusiveConsumer  ) 

Enables or disables whether or not queue consumers should be exclusive or not for example to preserve ordering when not using Message Groups.

Parameters:
exclusiveConsumer The value of this configuration option.
void activemq::core::ActiveMQConnectionFactory::setMessagePrioritySupported ( bool  value  ) 

Set whether or not this factory should create Connection objects with the Message priority support function enabled.

Parameters:
value Boolean indicating if Message priority should be enabled.
virtual void activemq::core::ActiveMQConnectionFactory::setMessageTransformer ( cms::MessageTransformer transformer  )  [virtual]

Set an MessageTransformer instance that is passed on to all Connection objects created from this ConnectionFactory.

Parameters:
transformer Pointer to the cms::MessageTransformer to set on all newly created Connection objects.

Implements cms::ConnectionFactory.

void activemq::core::ActiveMQConnectionFactory::setNonBlockingRedelivery ( bool  nonBlockingRedelivery  ) 

When true a MessageConsumer will not stop Message delivery before re-delivering Messages from a rolled back transaction.

This implies that message order will not be preserved and also will result in the TransactedIndividualAck option to be enabled.

Parameters:
nonBlockingRedelivery The value to configure for non-blocking redelivery.
void activemq::core::ActiveMQConnectionFactory::setOptimizeAcknowledge ( bool  optimizeAcknowledge  ) 

Sets if Consumers are configured to use Optimized Acknowledge by default.

Parameters:
optimizeAcknowledge The optimizeAcknowledge mode to set.
void activemq::core::ActiveMQConnectionFactory::setOptimizeAcknowledgeTimeOut ( long long  optimizeAcknowledgeTimeOut  ) 

The max time in milliseconds between optimized ack batches.

Parameters:
optimizeAcknowledgeTimeOut The time in milliseconds for optimized ack batches.
void activemq::core::ActiveMQConnectionFactory::setOptimizedAckScheduledAckInterval ( long long  optimizedAckScheduledAckInterval  ) 

Sets the amount of time between scheduled sends of any outstanding Message Acks for consumers that have been configured with optimizeAcknowledge enabled.

Time is given in Milliseconds.

Parameters:
optimizedAckScheduledAckInterval The scheduledOptimizedAckInterval to use for new Consumers.
void activemq::core::ActiveMQConnectionFactory::setPassword ( const std::string &  password  ) 

Sets the password that should be used when creating a new connection.

Parameters:
password string
void activemq::core::ActiveMQConnectionFactory::setPrefetchPolicy ( PrefetchPolicy policy  ) 

Sets the PrefetchPolicy instance that this factory should use when it creates new Connection instances.

The PrefetchPolicy passed becomes the property of the factory and will be deleted when the factory is destroyed.

Parameters:
policy The new PrefetchPolicy that the ConnectionFactory should clone for Connections.
void activemq::core::ActiveMQConnectionFactory::setProducerWindowSize ( unsigned int  windowSize  ) 

Sets the size in Bytes of messages that a producer can send before it is blocked to await a ProducerAck from the broker that frees enough memory to allow another message to be sent.

Parameters:
windowSize - The size in bytes of the Producers memory window.
void activemq::core::ActiveMQConnectionFactory::setRedeliveryPolicy ( RedeliveryPolicy policy  ) 

Sets the RedeliveryPolicy instance that this factory should use when it creates new Connection instances.

The RedeliveryPolicy passed becomes the property of the factory and will be deleted when the factory is destroyed.

Parameters:
policy The new RedeliveryPolicy that the ConnectionFactory should clone for Connections.
void activemq::core::ActiveMQConnectionFactory::setSendAcksAsync ( bool  sendAcksAsync  ) 

Sets whether Message acknowledgments are sent asynchronously meaning no response is required from the broker before the ack completes.

Parameters:
sendAcksAsync The sendAcksAsync configuration value to set.
void activemq::core::ActiveMQConnectionFactory::setSendTimeout ( unsigned int  timeout  ) 

Sets the send timeout to use when sending Message objects, this will cause all messages to be sent using a Synchronous request is non-zero.

Parameters:
timeout - The time to wait for a response.
void activemq::core::ActiveMQConnectionFactory::setTransactedIndividualAck ( bool  transactedIndividualAck  ) 

when true, submit individual transacted acks immediately rather than with transaction completion.

This allows the acks to represent delivery status which can be persisted on rollback Used in conjunction with KahaDB set to Rewrite On Redelivery.

Parameters:
transactedIndividualAck The value to set.
void activemq::core::ActiveMQConnectionFactory::setUseAsyncSend ( bool  value  ) 

Sets the useAsyncSend option.

Parameters:
value - true to activate, false to disable.
void activemq::core::ActiveMQConnectionFactory::setUseCompression ( bool  value  ) 

Sets whether Message body compression is enabled.

Parameters:
value Boolean indicating if Message body compression is enabled.
void activemq::core::ActiveMQConnectionFactory::setUseRetroactiveConsumer ( bool  useRetroactiveConsumer  ) 

Sets whether or not retroactive consumers are enabled.

Retroactive consumers allow non-durable topic subscribers to receive old messages that were published before the non-durable subscriber started.

Parameters:
useRetroactiveConsumer The value of this configuration option.
void activemq::core::ActiveMQConnectionFactory::setUsername ( const std::string &  username  ) 

Sets the username that should be used when creating a new connection.

Parameters:
username string
void activemq::core::ActiveMQConnectionFactory::setWatchTopicAdvisories ( bool  value  ) 

Sets whether Connection's created by this factory will listen for advisory messages regarding temporary destination creation and deletion.

Parameters:
value Boolean indicating if advisory message monitoring should be enabled.

Field Documentation


The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1