Search in sources :

Example 6 with Command

use of org.apache.activemq.command.Command in project activemq-artemis by apache.

the class UdpTestSupport method assertCommandReceived.

protected Command assertCommandReceived() throws InterruptedException {
    Command answer = null;
    synchronized (lock) {
        answer = receivedCommand;
        while (answer == null) {
            lock.wait(waitForCommandTimeout);
            answer = receivedCommand;
        }
    }
    assertNotNull("Should have received a Command by now!", answer);
    return answer;
}
Also used : Command(org.apache.activemq.command.Command)

Aggregations

Command (org.apache.activemq.command.Command)6 IOException (java.io.IOException)4 Response (org.apache.activemq.command.Response)3 MessageNotWriteableException (javax.jms.MessageNotWriteableException)2 ActiveMQTextMessage (org.apache.activemq.command.ActiveMQTextMessage)2 ControlCommand (org.apache.activemq.command.ControlCommand)2 DataArrayResponse (org.apache.activemq.command.DataArrayResponse)2 ExceptionResponse (org.apache.activemq.command.ExceptionResponse)2 FlushCommand (org.apache.activemq.command.FlushCommand)2 IntegerResponse (org.apache.activemq.command.IntegerResponse)2 ProducerInfo (org.apache.activemq.command.ProducerInfo)2 IllegalStateException (javax.jms.IllegalStateException)1 InvalidClientIDException (javax.jms.InvalidClientIDException)1 InvalidDestinationException (javax.jms.InvalidDestinationException)1 JMSSecurityException (javax.jms.JMSSecurityException)1 XAException (javax.transaction.xa.XAException)1 ActiveMQAddressExistsException (org.apache.activemq.artemis.api.core.ActiveMQAddressExistsException)1 ActiveMQException (org.apache.activemq.artemis.api.core.ActiveMQException)1 ActiveMQNonExistentQueueException (org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException)1 ActiveMQQueueExistsException (org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException)1