public class AndesJMSPublisher extends AndesJMSBase implements Runnable
jmsConfig| Constructor and Description |
|---|
AndesJMSPublisher(AndesJMSPublisherClientConfiguration config,
boolean createPublisher)
Creates a new JMS publisher with a given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
AndesJMSPublisherClientConfiguration |
getConfig()
Gets the configuration.
|
javax.jms.Connection |
getConnection()
Gets the JMS message sending connection (
Connection). |
void |
getMessageContentFromFile()
Reads message content from a file which is used as the message content to when publishing
messages.
|
double |
getPublisherTPS()
Gets the transactions per seconds for publisher.
|
javax.jms.MessageProducer |
getSender()
Gets the JMS message producer (
MessageProducer). |
long |
getSentMessageCount()
Gets the published message count.
|
javax.jms.Session |
getSession()
Gets the JMS message sending session (
Session). |
void |
run() |
void |
setConnection(javax.jms.Connection connection)
Sets the JMS message sending connection (
Connection). |
void |
setSender(javax.jms.MessageProducer sender)
Sets the JMS message producer (
MessageProducer). |
void |
setSession(javax.jms.Session session)
Sets the JMS message sending session (
Session). |
void |
startClient()
Starts up the publisher or consumer.
|
void |
stopClient()
Stops the publisher or consumer
|
getInitialContextpublic AndesJMSPublisher(AndesJMSPublisherClientConfiguration config, boolean createPublisher) throws NamingException, javax.jms.JMSException
config - The configurationcreatePublisher - Creates connection, session and sender.NamingExceptionjavax.jms.JMSExceptionpublic void startClient()
throws AndesClientException,
IOException
startClient in class AndesJMSBaseIOExceptionAndesClientExceptionpublic void stopClient()
throws javax.jms.JMSException
stopClient in class AndesJMSBasejavax.jms.JMSExceptionpublic void getMessageContentFromFile()
throws IOException
IOExceptionpublic long getSentMessageCount()
public double getPublisherTPS()
public AndesJMSPublisherClientConfiguration getConfig()
getConfig in class AndesJMSBasepublic javax.jms.Connection getConnection()
Connection).Connectionpublic void setConnection(javax.jms.Connection connection)
Connection).connection - A Connection.public javax.jms.Session getSession()
Session).Session.public void setSession(javax.jms.Session session)
Session).session - A Session.public javax.jms.MessageProducer getSender()
MessageProducer).MessageProducer.public void setSender(javax.jms.MessageProducer sender)
MessageProducer). Suppressing
"UnusedDeclaration" as the client acts as a service.sender - A MessageProducer.Copyright © 2019 WSO2. All rights reserved.