Package org.apache.qpid.client

Examples of org.apache.qpid.client.AMQAuthenticationException


            {
                if (errorCode == AMQConstant.NOT_ALLOWED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());

                    error = new AMQAuthenticationException(errorCode, reason == null ? null : reason.toString(), null);
                }
                else if (errorCode == AMQConstant.ACCESS_REFUSED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());
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

     *
     * @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

                    protocolSession.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

            {
                if (errorCode == AMQConstant.NOT_ALLOWED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());

                    error = new AMQAuthenticationException(errorCode, reason == null ? null : reason.toString(), null);
                }
                else if (errorCode == AMQConstant.ACCESS_REFUSED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());
View Full Code Here

            {
                if (errorCode == AMQConstant.NOT_ALLOWED || (errorCode == AMQConstant.ACCESS_REFUSED))
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());

                    error = new AMQAuthenticationException(errorCode, reason == null ? null : reason.toString(), null);
                }
                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

            {
                if (errorCode == AMQConstant.NOT_ALLOWED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());

                    error = new AMQAuthenticationException(errorCode, reason == null ? null : reason.toString(), null);
                }
                else if (errorCode == AMQConstant.ACCESS_REFUSED)
                {
                    _logger.info("Error :" + errorCode + ":" + Thread.currentThread().getName());
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

                evt.getProtocolSession().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);
            }
            else
            {
                _logger.info("Connection close received with error code " + errorCode);
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.