Package org.apache.activemq.command

Examples of org.apache.activemq.command.RemoveInfo


    boolean closedSocket = false;

    private void doClose() {
        if (!closing) {
            closing = true;
            sendToActiveMQ(new RemoveInfo(connectionId), new ResponseHandler() {
                @Override
                public void onResponse(IAmqpProtocolConverter converter, Response response) throws IOException {
                    protonConnection.close();
                    if (!closedSocket) {
                        pumpProtonToSocket();
View Full Code Here


    private void onSessionClose(Session session) {
        AmqpSessionContext sessionContext = (AmqpSessionContext) session.getContext();
        if (sessionContext != null) {
            LOG.trace("Session {} closed", sessionContext.sessionId);
            sendToActiveMQ(new RemoveInfo(sessionContext.sessionId), null);
            session.setContext(null);
        }
        session.close();
    }
View Full Code Here

    }

    private void doClose() throws JMSException {
        boolean interrupted = Thread.interrupted();
        dispose();
        RemoveInfo removeCommand = info.createRemoveCommand();
        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
        connection.asyncSendPacket(removeCommand);
        if (interrupted) {
            Thread.currentThread().interrupt();
        }
    }
View Full Code Here

                AmqpSessionContext session = (AmqpSessionContext) sender.getSession().getContext();
                if (session != null) {
                    session.consumers.remove(info.getConsumerId());
                }

                sendToActiveMQ(new RemoveInfo(consumerId), null);
            }
        }
View Full Code Here

                    this.activeTempDestinations.clear();

                    if (isConnectionInfoSentToBroker) {
                        // If we announced ourselves to the broker.. Try to let the broker
                        // know that the connection is being shutdown.
                        RemoveInfo removeCommand = info.createRemoveCommand();
                        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
                        doSyncSendPacket(info.createRemoveCommand(), closeTimeout);
                        doAsyncSendPacket(new ShutdownInfo());
                    }

                    started.set(false);
View Full Code Here

        // We should get an advisory of the second connection closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
        assertEquals(r.getObjectId(), connectionInfo2.getConnectionId());
       
        assertNoMessagesLeft(connection1);
    }
View Full Code Here

        // We should get an advisory of the consumer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
        assertEquals(r.getObjectId(), consumerInfo2.getConsumerId());
       
        assertNoMessagesLeft(connection2);
    }
View Full Code Here

        // We should get an advisory of the consumer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
        assertEquals(r.getObjectId(), consumerInfo2.getConsumerId());
       
        assertNoMessagesLeft(connection2);
    }
View Full Code Here

        // We should get an advisory of the producer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
        assertEquals(r.getObjectId(), producerInfo2.getProducerId());
       
        assertNoMessagesLeft(connection2);
    }
View Full Code Here

        // We should get an advisory of the producer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
        assertEquals(r.getObjectId(), producerInfo2.getProducerId());
       
        assertNoMessagesLeft(connection2);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.RemoveInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.