17#ifndef _ACTIVEMQ_CORE_ACTIVEMQCONNECTIONFACTORY_H_
18#define _ACTIVEMQ_CORE_ACTIVEMQCONNECTIONFACTORY_H_
33 using decaf::lang::Pointer;
36 class FactorySettings;
48 FactorySettings* settings;
52 ActiveMQConnectionFactory(
const ActiveMQConnectionFactory&);
53 ActiveMQConnectionFactory& operator=(
const ActiveMQConnectionFactory&);
70 const std::string& username =
"",
71 const std::string& password =
"");
84 const std::string& username =
"",
85 const std::string& password =
"");
121 const std::string& password);
146 const std::string& password,
147 const std::string& clientId);
708 const std::string& password,
const std::string& clientId =
"");
730 const std::string& password,
const std::string& clientId);
#define AMQCPP_API
Definition Config.h:30
void setRedeliveryPolicy(RedeliveryPolicy *policy)
Sets the RedeliveryPolicy instance that this factory should use when it creates new Connection instan...
void setSendAcksAsync(bool sendAcksAsync)
Sets whether Message acknowledgments are sent asynchronously meaning no response is required from the...
bool isDispatchAsync() const
void setAlwaysSyncSend(bool value)
Sets if the Connection should always send things Synchronously.
void setDispatchAsync(bool value)
Should messages be dispatched synchronously or asynchronously from the producer thread for non-durabl...
bool isSendAcksAsync() const
Returns whether Message acknowledgments are sent asynchronously meaning no response is required from ...
void setMessagePrioritySupported(bool value)
Set whether or not this factory should create Connection objects with the Message priority support fu...
void setUseCompression(bool value)
Sets whether Message body compression is enabled.
PrefetchPolicy * getPrefetchPolicy() const
Gets the pointer to the current PrefetchPolicy that is in use by this ConnectionFactory.
bool isExclusiveConsumer() const
Should all created consumers be exclusive.
const std::string & getUsername() const
Gets the username that this factory will use when creating a new connection instance.
virtual void setMessageTransformer(cms::MessageTransformer *transformer)
Set an MessageTransformer instance that is passed on to all Connection objects created from this Conn...
unsigned int getProducerWindowSize() const
Gets the configured producer window size for Producers that are created from this connector.
bool isUseCompression() const
Gets if the Connection is configured for Message body compression.
bool isUseAsyncSend() const
Gets if the useAsyncSend option is set.
bool isOptimizeAcknowledge() const
RedeliveryPolicy * getRedeliveryPolicy() const
Gets the pointer to the current RedeliveryPolicy that is in use by this ConnectionFactory.
ActiveMQConnectionFactory(const decaf::net::URI &uri, const std::string &username="", const std::string &password="")
Constructor.
void setConsumerFailoverRedeliveryWaitPeriod(long long value)
Sets the delay period for a consumer redelivery.
void setAuditDepth(int auditDepth)
Set the audit depth for Messages for consumers when using a fault tolerant transport.
void setTransactedIndividualAck(bool transactedIndividualAck)
when true, submit individual transacted acks immediately rather than with transaction completion.
void setUseAsyncSend(bool value)
Sets the useAsyncSend option.
unsigned int getConnectResponseTimeout() const
Gets the assigned connect response timeout for this Connector.
long long getOptimizedAckScheduledAckInterval() const
Gets the configured time interval that is used to force all MessageConsumers that have optimizedAckno...
virtual cms::MessageTransformer * getMessageTransformer() const
Gets the currently configured MessageTransformer for this ConnectionFactory.
void setOptimizedAckScheduledAckInterval(long long optimizedAckScheduledAckInterval)
Sets the amount of time between scheduled sends of any outstanding Message Acks for consumers that ha...
std::string getClientId() const
Gets the Configured Client Id.
void setCloseTimeout(unsigned int timeout)
Sets the close timeout to use when sending the disconnect request.
bool isWatchTopicAdvisories() const
Is the Connection created by this factory configured to watch for advisory messages that inform the C...
void setProducerWindowSize(unsigned int windowSize)
Sets the size in Bytes of messages that a producer can send before it is blocked to await a ProducerA...
void setUsername(const std::string &username)
Sets the username that should be used when creating a new connection.
bool isCheckForDuplicates() const
Gets the value of the configured Duplicate Message detection feature.
void setBrokerURI(const std::string &uri)
Sets the Broker URI that should be used when creating a new connection instance.
void setAuditMaximumProducerNumber(int auditMaximumProducerNumber)
The number of Producers that will be audited.
virtual cms::ExceptionListener * getExceptionListener() const
Returns the currently set ExceptionListener that will be set on any new Connection instance that is c...
void setSendTimeout(unsigned int timeout)
Sets the send timeout to use when sending Message objects, this will cause all messages to be sent us...
void setPassword(const std::string &password)
Sets the password that should be used when creating a new connection.
int getAuditMaximumProducerNumber() const
The number of Producers that will be audited.
ActiveMQConnectionFactory()
void setBrokerURI(const decaf::net::URI &uri)
Sets the Broker URI that should be used 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.
const std::string & getPassword() const
Gets the password that this factory will use when creating a new connection instance.
void setConsumerExpiryCheckEnabled(bool consumerExpiryCheckEnabled)
Configures whether this consumer will perform message expiration processing on all incoming messages.
bool isMessagePrioritySupported() const
static cms::Connection * createConnection(const std::string &uri, const std::string &username, const std::string &password, const std::string &clientId="")
Creates a connection with the specified user identity.
long long getConsumerFailoverRedeliveryWaitPeriod() const
Gets the delay period for a consumer redelivery.
void setOptimizeAcknowledge(bool optimizeAcknowledge)
Sets if Consumers are configured to use Optimized Acknowledge by default.
const decaf::net::URI & getBrokerURI() const
Gets the Broker URI that this factory will use when creating a new connection instance.
bool isAlwaysSyncSend() const
Gets if the Connection should always send things Synchronously.
void setCheckForDuplicates(bool checkForDuplicates)
Gets the value of the configured Duplicate Message detection feature.
void setAlwaysSessionAsync(bool alwaysSessionAsync)
If this flag is not set 'true' then a separate thread is not used for dispatching messages for each S...
unsigned int getCloseTimeout() const
Gets the assigned close timeout for this Connector.
void setClientId(const std::string &clientId)
Sets the Client Id.
void setPrefetchPolicy(PrefetchPolicy *policy)
Sets the PrefetchPolicy instance that this factory should use when it creates new Connection instance...
static const std::string DEFAULT_URI
Definition ActiveMQConnectionFactory.h:44
virtual cms::Connection * createConnection(const std::string &username, const std::string &password, const std::string &clientId)
Creates a connection with the specified user identity.
void setConnectResponseTimeout(unsigned int connectResponseTimeout)
Sets the connect response timeout to use when sending Message objects, this will protect clients usin...
void setExclusiveConsumer(bool exclusiveConsumer)
Enables or disables whether or not queue consumers should be exclusive or not for example to preserve...
void setWatchTopicAdvisories(bool value)
Sets whether Connection's created by this factory will listen for advisory messages regarding tempora...
void setNonBlockingRedelivery(bool nonBlockingRedelivery)
When true a MessageConsumer will not stop Message delivery before re-delivering Messages from a rolle...
virtual ~ActiveMQConnectionFactory()
void setCompressionLevel(int value)
Sets the Compression level used when Message body compression is enabled, a value of -1 causes the Co...
bool isConsumerExpiryCheckEnabled()
bool isUseRetroactiveConsumer() const
Should all created consumers be retroactive.
virtual ActiveMQConnection * createActiveMQConnection(const Pointer< transport::Transport > &transport, const Pointer< decaf::util::Properties > &properties)
Create a new ActiveMQConnection instnace using the provided Transport and Properties.
void setUseRetroactiveConsumer(bool useRetroactiveConsumer)
Sets whether or not retroactive consumers are enabled.
int getAuditDepth() const
Get the audit depth for Messages for consumers when using a fault tolerant transport.
bool isNonBlockingRedelivery() const
Returns true if non-blocking redelivery of Messages is configured for Consumers that are rolled back ...
void setOptimizeAcknowledgeTimeOut(long long optimizeAcknowledgeTimeOut)
The max time in milliseconds between optimized ack batches.
bool isAlwaysSessionAsync() const
Returns the current value of the always session async option.
virtual cms::Connection * createConnection()
Creates a connection with the default user identity.
int getCompressionLevel() const
Gets the currently configured Compression level for Message bodies.
virtual cms::Connection * createConnection(const std::string &username, const std::string &password)
Creates a connection with the specified user identity.
bool isTransactedIndividualAck() const
when true, submit individual transacted acks immediately rather than with transaction completion.
long long getOptimizeAcknowledgeTimeOut() const
Gets the time between optimized ack batches in milliseconds.
unsigned int getSendTimeout() const
Gets the assigned send timeout for this Connector.
ActiveMQConnectionFactory(const std::string &uri, const std::string &username="", const std::string &password="")
Constructor.
Concrete connection used for all connectors to the ActiveMQ broker.
Definition ActiveMQConnection.h:62
Interface for a Policy object that controls message Prefetching on various destination types in Activ...
Definition PrefetchPolicy.h:34
Interface for a RedeliveryPolicy object that controls how message Redelivery is handled in ActiveMQ-C...
Definition RedeliveryPolicy.h:34
Defines the interface for a factory that creates connection objects, the Connection objects returned ...
Definition ConnectionFactory.h:41
The client's connection to its provider.
Definition Connection.h:70
If a CMS provider detects a serious problem, it notifies the client application through an ExceptionL...
Definition ExceptionListener.h:37
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
This class represents an instance of a URI as defined by RFC 2396.
Definition URI.h:37
Definition ActiveMQTempDestination.h:29
Definition AbstractTransportFactory.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24