public class AndesJMSConsumerClientConfiguration extends AndesJMSClientConfiguration
| Constructor and Description |
|---|
AndesJMSConsumerClientConfiguration()
Creates a consumer configuration with default values.
|
AndesJMSConsumerClientConfiguration(AndesJMSClientConfiguration config)
The copy constructor for the JMS base class.
|
AndesJMSConsumerClientConfiguration(ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given exchange type and destination with default connection string.
|
AndesJMSConsumerClientConfiguration(int port,
ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given port for connection string and exchange type and
destination name.
|
AndesJMSConsumerClientConfiguration(int port,
String userName,
String password,
ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given port, username, password, for connection
string and exchange type and destination name.
|
AndesJMSConsumerClientConfiguration(String xmlConfigFilePath)
Creates a configuration for a consumer using an xml file.
|
AndesJMSConsumerClientConfiguration(String hostName,
int port,
ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given host name, port for connection string and exchange type and
destination name.
|
AndesJMSConsumerClientConfiguration(String userName,
String password,
ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given username, password, for connection
string and exchange type and destination name.
|
AndesJMSConsumerClientConfiguration(String userName,
String password,
String hostName,
int port,
ExchangeType exchangeType,
String destinationName)
Creates a consumer with a given user name, password, host name, port for connection
string and exchange type and destination name.
|
AndesJMSConsumerClientConfiguration(String userName,
String password,
String hostName,
int port,
ExchangeType exchangeType,
String destinationName,
String sslAlias,
String trustStorePath,
String trustStorePassword,
String keyStorePath,
String keyStorePassword)
Creates a JMS message consumer with a given AMQP transport connection string for SSL and a
given exchange type and destination.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReceivedMessage(String receivedMessages)
Adding the message content to the received messages list, after receiving the message, for this consumer.
|
AndesJMSConsumerClientConfiguration |
clone() |
long |
getAcknowledgeAfterEachMessageCount()
Gets the message count at which a message should be acknowledged after.
|
JMSAcknowledgeMode |
getAcknowledgeMode()
Gets acknowledge mode for messages.
|
long |
getCommitAfterEachMessageCount()
Gets the message count at which the session should be committed.
|
String |
getFilePathToWriteReceivedMessages()
Gets the file path where the received messages should be written to,
|
long |
getMaximumMessagesToReceived()
Gets the maximum number of messages to received.
|
List<String> |
getReceivedMessages()
This method returns received messages for this consumer.
|
long |
getRecoverAfterEachMessageCount()
Gets the message count at which the session should be recovered.
|
long |
getRollbackAfterEachMessageCount()
Gets the message count at which the session should be rolled-back.
|
String |
getSelectors()
Gets the selectors query used by the consumer for filtering.
|
String |
getSubscriptionID()
Gets the subscription ID.
|
long |
getUnSubscribeAfterEachMessageCount()
Gets the message count to un-subscribe the consumer.
|
boolean |
isAsync()
Checks whether consumer is asynchronously reading messages.
|
boolean |
isDurable()
Checks whether the subscriber/consumer is durable.
|
void |
setAcknowledgeAfterEachMessageCount(long acknowledgeAfterEachMessageCount)
Sets the message count at which a message should be acknowledged after.
|
void |
setAcknowledgeMode(JMSAcknowledgeMode acknowledgeMode)
Sets acknowledge mode for messages.
|
void |
setAsync(boolean async)
Sets the consumer to read message asynchronously.
|
void |
setCommitAfterEachMessageCount(long commitAfterEachMessageCount)
Sets the message count at which the session should be committed.
|
void |
setDurable(boolean durable,
String subscriptionID)
Sets values for a durable subscription
|
void |
setFilePathToWriteReceivedMessages(String filePathToWriteReceivedMessages)
Sets the file path where the received messages should be written to,
|
void |
setMaximumMessagesToReceived(long maximumMessagesToReceived)
Sets the maximum number of messages to received.
|
void |
setRecoverAfterEachMessageCount(long recoverAfterEachMessageCount)
Sets message count at which the session should be recovered.
|
void |
setRollbackAfterEachMessageCount(long rollbackAfterEachMessageCount)
Sets message count at which the session should be rolled-back.
|
void |
setSelectors(String selectors)
Sets the selectors query used by the consumer for filtering.
|
void |
setSubscriptionID(String subscriptionID)
Sets the subscription ID
|
void |
setUnSubscribeAfterEachMessageCount(long unSubscribeAfterEachMessageCount)
Sets message count to un-subscribe the consumer.
|
String |
toString() |
getConnectionString, getDestinationName, getExchangeType, getFilePathToWriteStatistics, getHostName, getPassword, getPort, getPrintsPerMessageCount, getRunningDelay, getUserName, setConnectionString, setDestinationName, setExchangeType, setFilePathToWriteStatistics, setHostName, setPassword, setPort, setPrintsPerMessageCount, setRunningDelay, setUserNamepublic AndesJMSConsumerClientConfiguration()
public AndesJMSConsumerClientConfiguration(ExchangeType exchangeType, String destinationName)
exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(String hostName, int port, ExchangeType exchangeType, String destinationName)
hostName - The host name for connection string.port - The port for the connection string.exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(int port,
ExchangeType exchangeType,
String destinationName)
port - The port for the connection string.exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(String userName, String password, ExchangeType exchangeType, String destinationName)
userName - The user name for the connection string.password - The password for the connection string.exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(int port,
String userName,
String password,
ExchangeType exchangeType,
String destinationName)
userName - The user name for the connection string.password - The password for the connection string.exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(String userName, String password, String hostName, int port, ExchangeType exchangeType, String destinationName)
userName - The user name for the connection string.password - The password for the connection string.hostName - The host name for the connection string.port - The port for the connection string.exchangeType - The exchange type.destinationName - The destination name.public AndesJMSConsumerClientConfiguration(String xmlConfigFilePath) throws AndesClientConfigurationException
xmlConfigFilePath - The file path for the xml configuration file path.AndesClientConfigurationExceptionpublic AndesJMSConsumerClientConfiguration(AndesJMSClientConfiguration config)
config - The configuration to be copied.public AndesJMSConsumerClientConfiguration(String userName, String password, String hostName, int port, ExchangeType exchangeType, String destinationName, String sslAlias, String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword)
userName - The user name for the connection string.password - The password for the connection string.hostName - The host name for the connection string.port - The port for the connection string.exchangeType - The exchange type.destinationName - The destination name.sslAlias - The ssl alias to use in ssl connection.trustStorePath - The file path for trust store to use in ssl connection.trustStorePassword - The trust store password to use in ssl connection.keyStorePath - The file path for key store to use in ssl connection.keyStorePassword - The key store password to use in ssl connection.public long getUnSubscribeAfterEachMessageCount()
public void setUnSubscribeAfterEachMessageCount(long unSubscribeAfterEachMessageCount)
throws AndesClientConfigurationException
unSubscribeAfterEachMessageCount - The message count to un-subscribe the consumer.AndesClientConfigurationExceptionpublic long getRollbackAfterEachMessageCount()
public long getRecoverAfterEachMessageCount()
public void setRollbackAfterEachMessageCount(long rollbackAfterEachMessageCount)
throws AndesClientConfigurationException
rollbackAfterEachMessageCount - The message count at which the session should be
rolled-back.AndesClientConfigurationExceptionpublic void setRecoverAfterEachMessageCount(long recoverAfterEachMessageCount)
throws AndesClientConfigurationException
recoverAfterEachMessageCount - The message count at which the session should be recovered.AndesClientConfigurationException - on in-applicable value passedpublic long getCommitAfterEachMessageCount()
public void setCommitAfterEachMessageCount(long commitAfterEachMessageCount)
throws AndesClientConfigurationException
commitAfterEachMessageCount - The message count at which the session should be
committed.AndesClientConfigurationExceptionpublic long getAcknowledgeAfterEachMessageCount()
public void setAcknowledgeAfterEachMessageCount(long acknowledgeAfterEachMessageCount)
throws AndesClientConfigurationException
acknowledgeAfterEachMessageCount - The the message count at which a message should be
acknowledged after.AndesClientConfigurationExceptionpublic String getFilePathToWriteReceivedMessages()
public void setFilePathToWriteReceivedMessages(String filePathToWriteReceivedMessages)
filePathToWriteReceivedMessages - The file path where the received messages should be
written to,public long getMaximumMessagesToReceived()
public void setMaximumMessagesToReceived(long maximumMessagesToReceived)
throws AndesClientConfigurationException
maximumMessagesToReceived - The maximum number of messages to received.AndesClientConfigurationExceptionpublic String getSubscriptionID()
public void setSubscriptionID(String subscriptionID) throws AndesClientConfigurationException
subscriptionID - The subscription IDAndesClientConfigurationExceptionpublic boolean isDurable()
public void setDurable(boolean durable,
String subscriptionID)
throws AndesClientConfigurationException
durable - True if subscription is durable, false otherwise.subscriptionID - The subscription ID.AndesClientConfigurationExceptionpublic JMSAcknowledgeMode getAcknowledgeMode()
public void setAcknowledgeMode(JMSAcknowledgeMode acknowledgeMode) throws AndesClientConfigurationException
acknowledgeMode - The acknowledge mode for messages.AndesClientConfigurationExceptionpublic boolean isAsync()
MessageListener to listen to receiving
messages.public void setAsync(boolean async)
MessageListener to listen to receiving
messages.
Suppressing "UnusedDeclaration" as this is a configurationasync - true if messages should be read asynchronously, false otherwise.public String getSelectors()
public void setSelectors(String selectors)
selectors - The selectors query used by the consumer for filtering.public List<String> getReceivedMessages()
public void addReceivedMessage(String receivedMessages)
public String toString()
toString in class AndesJMSClientConfigurationpublic AndesJMSConsumerClientConfiguration clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2019 WSO2. All rights reserved.