Package org.apache.activemq.command

Examples of org.apache.activemq.command.RemoveInfo


                    cleanUpTempDestinations();

                    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


    void doClose() throws JMSException {
        // Store interrupted state and clear so that Transport operations don't
        // throw InterruptedException and we ensure that resources are clened up.
        boolean interrupted = Thread.interrupted();
        dispose();
        RemoveInfo removeCommand = info.createRemoveCommand();
        if (LOG.isDebugEnabled()) {
            LOG.debug("remove: " + this.getConsumerId() + ", lastDeliveredSequenceId:" + lastDeliveredSequenceId);
        }
        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
        this.session.asyncSendPacket(removeCommand);
        if (interrupted) {
            Thread.currentThread().interrupt();
        }
    }
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

                boolean removed = ds.getDurableRemoteSubs().remove(subscriptionInfo);
                if (removed) {
                    if (ds.getDurableRemoteSubs().isEmpty()) {

                        // deactivate subscriber
                        RemoveInfo removeInfo = new RemoveInfo(ds.getLocalInfo().getConsumerId());
                        localBroker.oneway(removeInfo);

                        // remove subscriber
                        RemoveSubscriptionInfo sending = new RemoveSubscriptionInfo();
                        sending.setClientId(localClientId);
View Full Code Here

        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());
View Full Code Here

    public void testResponsesSentWhenRequestForIgnoredCommands() throws Exception {
        this.transport = createTransport();
        assertNotNull(failoverTransport);
        MessageAck ack = new MessageAck();
        assertNotNull("Should have received a Response", this.transport.request(ack));
        RemoveInfo info = new RemoveInfo(new ConnectionId("2"));
        assertNotNull("Should have received a Response", this.transport.request(info));
    }
View Full Code Here

    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();
        session.free();
    }
View Full Code Here

        }

        @Override
        public void onClose() throws Exception {
            if (!closed) {
                sendToActiveMQ(new RemoveInfo(producerId), null);
            }
        }
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

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.