Package com.rabbitmq.client

Examples of com.rabbitmq.client.Command


        ShutdownSignalException sse = snc.getCloseReason();
        checkShutdownSignal(expectedCode, sse);
    }

    public void checkShutdownSignal(int expectedCode, ShutdownSignalException sse) {
        Command closeCommand = (Command) sse.getReason();
        channel = null;
        if (sse.isHardError()) {
            connection = null;
            AMQP.Connection.Close closeMethod = (AMQP.Connection.Close) closeCommand.getMethod();
            assertEquals(expectedCode, closeMethod.getReplyCode());
        } else {
            AMQP.Channel.Close closeMethod = (AMQP.Channel.Close) closeCommand.getMethod();
            assertEquals(expectedCode, closeMethod.getReplyCode());
        }
    }
View Full Code Here


            channel.basicRecover(false);
            fail("basicRecover(false) should not be supported");
        } catch(IOException ioe) {
            ShutdownSignalException sse =
                (ShutdownSignalException) ioe.getCause();
            Command reason = (Command) sse.getReason();
            AMQP.Connection.Close close =
                (AMQP.Connection.Close) reason.getMethod();
            assertEquals("NOT_IMPLEMENTED - requeue=false",
                close.getReplyText());
        }
    }
View Full Code Here

TOP

Related Classes of com.rabbitmq.client.Command

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.