Package org.apache.qpid.client

Examples of org.apache.qpid.client.AMQAuthenticationException


     *
     * @throws InterruptedException  - if we are unable to wait for the test signals
     */
    public void testFrameListenerUpdateWithAMQException() throws InterruptedException
    {
        AMQException trigger = new AMQAuthenticationException(AMQConstant.ACCESS_REFUSED,
                                                              "AMQPHTest", new RuntimeException());

        performWithException(trigger);


        AMQException receivedException = (AMQException) _listener.getReceivedException();

        assertEquals("Return exception was not the expected type",
                     AMQAuthenticationException.class, receivedException.getClass());

        assertEquals("The _Listener did not receive the correct error code",
                     trigger.getErrorCode(), receivedException.getErrorCode());
    }
View Full Code Here


     *
     * @throws InterruptedException  - if we are unable to wait for the test signals
     */
    public void testFrameListenerUpdateWithAMQException() throws InterruptedException
    {
        AMQException trigger = new AMQAuthenticationException(AMQConstant.ACCESS_REFUSED,
                                                              "AMQPHTest", new RuntimeException());

        performWithException(trigger);


        AMQException receivedException = (AMQException) _listener.getReceivedException();

        assertEquals("Return exception was not the expected type",
                     AMQAuthenticationException.class, receivedException.getClass());

        assertEquals("The _Listener did not receive the correct error code",
                     trigger.getErrorCode(), receivedException.getErrorCode());
    }
View Full Code Here

                    session.closeProtocolSession();

                    // todo this is a bit of a fudge (could be conssidered such as each new connection needs a new state manager or at least a fresh state.
                    stateManager.changeState(AMQState.CONNECTION_NOT_STARTED);

                    throw new AMQAuthenticationException(errorCode, (reason == null) ? null : reason.toString());
                }
                else
                {
                    _logger.info("Connection close received with error code " + errorCode);
View Full Code Here

     *
     * @throws InterruptedException  - if we are unable to wait for the test signals
     */
    public void testFrameListenerUpdateWithAMQException() throws InterruptedException
    {
        AMQException trigger = new AMQAuthenticationException(AMQConstant.ACCESS_REFUSED,
                                                              "AMQPHTest", new RuntimeException());

        performWithException(trigger);


        AMQException receivedException = (AMQException) _listener.getReceivedException();

        assertEquals("Return exception was not the expected type",
                     AMQAuthenticationException.class, receivedException.getClass());

        assertEquals("The _Listener did not receive the correct error code",
                     trigger.getErrorCode(), receivedException.getErrorCode());
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.AMQAuthenticationException

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.