|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.test.utils.QpidBrokerTestCase
org.apache.qpid.test.utils.QpidClientConnection
public class QpidClientConnection
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
QpidBrokerTestCase.MessageType |
Field Summary | |
---|---|
protected boolean |
connected
|
protected Session |
session
|
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _output, _outputFile, _testName, BROKER_READY, CONTENT, CPP, DEFAULT_MANAGEMENT_PORT, DEFAULT_MESSAGE_SIZE, DEFAULT_PORT, DEFAULT_SSL_PORT, DEFAULT_VM_PORT, EXTERNAL, INDEX, JAVA, LOGMONITOR_TIMEOUT, QPID_HOME, QpidHome, QUEUE, RECEIVE_TIMEOUT, TOPIC, VM |
Fields inherited from class org.apache.qpid.test.utils.QpidTestCase |
---|
MEMORY_STORE_CLASS_NAME, MS_CLASS_NAME_KEY |
Constructor Summary | |
---|---|
QpidClientConnection(String broker)
|
Method Summary | |
---|---|
void |
connect()
|
void |
consume(String queueName,
int readTimeout)
Completely clears a queue. |
void |
disconnect()
|
void |
disconnectWithoutCommit()
|
String |
getBrokerList()
|
Connection |
getConnection()
|
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)
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 org.apache.qpid.test.utils.QpidTestCase |
---|
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Session session
protected boolean connected
Constructor Detail |
---|
public QpidClientConnection(String broker)
Method Detail |
---|
public Connection getConnection()
getConnection
in class QpidBrokerTestCase
public void connect() throws JMSException
JMSException
public void disconnect() throws Exception
Exception
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) 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 |