|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.test.utils.QpidClientConnectionHelper
public class QpidClientConnectionHelper
Field Summary | |
---|---|
protected boolean |
connected
|
protected Session |
session
|
Constructor Summary | |
---|---|
QpidClientConnectionHelper(String broker)
|
Method Summary | |
---|---|
void |
connect()
|
void |
consume(String queueName,
int readTimeout)
Completely clears a queue. |
void |
disconnect()
|
void |
disconnectWithoutCommit()
|
String |
getBrokerList()
|
Message |
getNextMessage(String queueName)
GET the top message on a queue. |
Message |
getNextMessage(String queueName,
long readTimeout)
GET the top message on a queue. |
Session |
getSession()
|
String |
getVirtualHost()
|
boolean |
isConnected()
|
void |
onException(JMSException exception)
override as necessary |
void |
put(String queueName,
String payload,
int copies,
int deliveryMode)
Put a String as a text messages, repeat n times. |
void |
setBrokerList(String brokerlist)
|
void |
setPrefetch(int prefetch)
|
void |
setVirtualHost(String virtualHost)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Session session
protected boolean connected
Constructor Detail |
---|
public QpidClientConnectionHelper(String broker)
Method Detail |
---|
public void connect() throws JMSException
JMSException
public void disconnect() throws JMSException
JMSException
public void disconnectWithoutCommit() throws JMSException
JMSException
public String getBrokerList()
public void setBrokerList(String brokerlist)
public String getVirtualHost()
public void setVirtualHost(String virtualHost)
public void setPrefetch(int prefetch)
public void onException(JMSException exception)
onException
in interface ExceptionListener
public boolean isConnected()
public Session getSession()
public void put(String queueName, String payload, int copies, int deliveryMode) throws JMSException
queueName
- The queue name to put topayload
- the content of the payloadcopies
- the number of messages to put
JMSException
- any exception that occurspublic Message getNextMessage(String queueName, long readTimeout) throws JMSException
queueName
- The quename to get fromreadTimeout
- The timeout to use
JMSException
- any exception that occuredpublic Message getNextMessage(String queueName) throws JMSException
queueName
- The Queuename to get from
JMSException
- any exception that occurspublic void consume(String queueName, int readTimeout) throws JMSException, InterruptedException
queueName
- The Queue name to consume fromreadTimeout
- The timeout for each consume
JMSException
- Any exception that occurs during the consume
InterruptedException
- If the consume thread was interrupted during a consume.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |