Package org.apache.activemq.command

Examples of org.apache.activemq.command.ShutdownInfo


                                    List<Runnable> pendingTasks = serialExecutor.shutdownNow();
                                    if (LOG.isInfoEnabled()) {
                                        LOG.info("pending tasks on stop" + pendingTasks);
                                    }
                                }
                                localBroker.oneway(new ShutdownInfo());
                                remoteBroker.oneway(new ShutdownInfo());
                            } catch (Throwable e) {
                                if (LOG.isDebugEnabled()) {
                                    LOG.debug("Caught exception sending shutdown", e);
                                }
                            } finally {
View Full Code Here


        try {
            if (pendingStop || stopping.get()) {
                if (dispatchStopped.compareAndSet(false, true)) {
                    if (transportException.get() == null) {
                        try {
                            dispatch(new ShutdownInfo());
                        } catch (Throwable ignore) {
                        }
                    }
                    dispatchStoppedLatch.countDown();
                }
View Full Code Here

                localBroker.request(connectionInfo.createRemoveCommand());
                remoteBroker.request(connectionInfo.createRemoveCommand());
            }
            localBroker.setTransportListener(null);
            remoteBroker.setTransportListener(null);
            localBroker.oneway(new ShutdownInfo());
            remoteBroker.oneway(new ShutdownInfo());
        } finally {
            ServiceStopper ss = new ServiceStopper();
            ss.stop(localBroker);
            ss.stop(remoteBroker);
            ss.throwFirstException();
View Full Code Here

    void onMQTTDisconnect() throws MQTTProtocolException {
        if (connected.get()) {
            connected.set(false);
            sendToActiveMQ(connectionInfo.createRemoveCommand(), null);
            sendToActiveMQ(new ShutdownInfo(), null);
        }
        stopTransport();
    }
View Full Code Here

                        // 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);

                    // TODO if we move the TaskRunnerFactory to the connection
View Full Code Here

    public void stop() throws Exception {
        shuttingDown = true;
        if (transport != null) {
            try {
                transport.oneway(new ShutdownInfo());
            } catch (IOException e) {
            }
            ServiceSupport.dispose(transport);
        }
    }
View Full Code Here

    public void stop() throws Exception {
        shuttingDown = true;
        if (transport != null) {
            try {
                transport.oneway(new ShutdownInfo());
            } catch (IOException e) {
            }
            ServiceSupport.dispose(transport);
        }
    }
View Full Code Here

                        // 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);

                    // TODO if we move the TaskRunnerFactory to the connection
View Full Code Here

            // let the peer know that we are disconnecting after attempting
            // to cleanly shutdown the async tasks so that this is the last
            // command it see's.
            try {
                peer.transportListener.onCommand(new ShutdownInfo());
            } catch (Exception ignore) {
            }

            // let any requests pending a response see an exception
            try {
View Full Code Here

    void onMQTTDisconnect() throws MQTTProtocolException {
        if (connected.get()) {
            connected.set(false);
            sendToActiveMQ(connectionInfo.createRemoveCommand(), null);
            sendToActiveMQ(new ShutdownInfo(), null);
        }
        stopTransport();
    }
View Full Code Here

TOP

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

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.