Search in sources :

Example 21 with RemoveInfo

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

the class RemoveInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    RemoveInfo info = new RemoveInfo();
    populateObject(info);
    return info;
}
Also used : RemoveInfo(org.apache.activemq.command.RemoveInfo)

Example 22 with RemoveInfo

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

the class RemoveInfoTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    RemoveInfo info = (RemoveInfo) object;
    info.setObjectId(createDataStructure("ObjectId:1"));
    info.setLastDeliveredSequenceId(1);
}
Also used : RemoveInfo(org.apache.activemq.command.RemoveInfo)

Example 23 with RemoveInfo

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

the class RemoveInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    RemoveInfo info = new RemoveInfo();
    populateObject(info);
    return info;
}
Also used : RemoveInfo(org.apache.activemq.command.RemoveInfo)

Example 24 with RemoveInfo

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

the class RemoveInfoTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    RemoveInfo info = (RemoveInfo) object;
    info.setObjectId(createDataStructure("ObjectId:1"));
}
Also used : RemoveInfo(org.apache.activemq.command.RemoveInfo)

Example 25 with RemoveInfo

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

the class FailoverTransportTest method testCommandsIgnoredWhenOffline.

@Test(timeout = 30000)
public void testCommandsIgnoredWhenOffline() throws Exception {
    this.transport = createTransport();
    assertNotNull(failoverTransport);
    ConnectionStateTracker tracker = failoverTransport.getStateTracker();
    assertNotNull(tracker);
    ConnectionId id = new ConnectionId("1");
    ConnectionInfo connection = new ConnectionInfo(id);
    // Track a connection
    tracker.track(connection);
    try {
        this.transport.oneway(new RemoveInfo(new ConnectionId("1")));
    } catch (Exception e) {
        fail("Should not have failed to remove this known connection");
    }
    try {
        this.transport.oneway(new RemoveInfo(new ConnectionId("2")));
    } catch (Exception e) {
        fail("Should not have failed to remove this unknown connection");
    }
    this.transport.oneway(new MessageAck());
    this.transport.oneway(new ShutdownInfo());
}
Also used : ConnectionId(org.apache.activemq.command.ConnectionId) RemoveInfo(org.apache.activemq.command.RemoveInfo) MessageAck(org.apache.activemq.command.MessageAck) ConnectionStateTracker(org.apache.activemq.state.ConnectionStateTracker) ConnectionInfo(org.apache.activemq.command.ConnectionInfo) ShutdownInfo(org.apache.activemq.command.ShutdownInfo) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

RemoveInfo (org.apache.activemq.command.RemoveInfo)28 ConsumerInfo (org.apache.activemq.command.ConsumerInfo)8 ConnectionInfo (org.apache.activemq.command.ConnectionInfo)6 StubConnection (org.apache.activemq.broker.StubConnection)5 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)5 Message (org.apache.activemq.command.Message)5 SessionInfo (org.apache.activemq.command.SessionInfo)5 ActiveMQQueue (org.apache.activemq.command.ActiveMQQueue)4 MessageAck (org.apache.activemq.command.MessageAck)4 Test (org.junit.Test)4 ActiveMQMessage (org.apache.activemq.command.ActiveMQMessage)3 ConnectionId (org.apache.activemq.command.ConnectionId)3 ProducerInfo (org.apache.activemq.command.ProducerInfo)2 Response (org.apache.activemq.command.Response)2 FutureResponse (org.apache.activemq.transport.FutureResponse)2 ResponseCallback (org.apache.activemq.transport.ResponseCallback)2 IOException (java.io.IOException)1 BrokerService (org.apache.activemq.broker.BrokerService)1 ActiveMQTopic (org.apache.activemq.command.ActiveMQTopic)1 BrokerId (org.apache.activemq.command.BrokerId)1