Package org.apache.qpid

Examples of org.apache.qpid.AMQConnectionException


                    description, mandatory, isTransactional(), closeOnNoRoute));
        }

        if (mandatory && isTransactional() && _session.isCloseWhenNoRoute())
        {
            throw new AMQConnectionException(
                    AMQConstant.NO_ROUTE,
                    "No route for message " + currentMessageDescription(),
                    0, 0, // default class and method ids
                    getProtocolSession().getProtocolVersion().getMajorVersion(),
                    getProtocolSession().getProtocolVersion().getMinorVersion(),
View Full Code Here


                }
            }
            else if (!exchange.getType().equals(body.getType()))
            {

                throw new AMQConnectionException(AMQConstant.NOT_ALLOWED, "Attempt to redeclare exchange: " + body.getExchange() + " of type " + exchange.getType() + " to " + body.getType() +".",body.getClazz(), body.getMethod(),body.getMajor(),body.getMinor(),null);
            }

        }
        if(!body.getNowait())
        {
View Full Code Here

    {
        while (!_registry.isEmpty())
        {
            AMQProtocolSession connection = _registry.get(0);

            connection.closeConnection(0, new AMQConnectionException(AMQConstant.INTERNAL_ERROR, "Broker is shutting down",
                                                                  0, 0,
                                                                  connection.getProtocolOutputConverter().getProtocolMajorVersion(),
                                                                  connection.getProtocolOutputConverter().getProtocolMinorVersion(),
                                                                  (Throwable) null), true);
        }
View Full Code Here

                    if (_logger.isInfoEnabled())
                    {
                        _logger.info("Closing connection due to: " + e.getMessage());
                    }

                    AMQConnectionException ce =
                            evt.getMethod().getConnectionException(AMQConstant.CHANNEL_ERROR,
                                                                   AMQConstant.CHANNEL_ERROR.getName().toString());

                    closeConnection(channelId, ce, false);
                }
View Full Code Here

        return new AMQChannelException(code, message, getClazz(), getMethod(), getMajor(), getMinor(), cause);
    }

    public AMQConnectionException getConnectionException(AMQConstant code, String message)
    {
        return new AMQConnectionException(code, message, getClazz(), getMethod(), getMajor(), getMinor(), null);
    }
View Full Code Here

        return new AMQConnectionException(code, message, getClazz(), getMethod(), getMajor(), getMinor(), null);
    }

    public AMQConnectionException getConnectionException(AMQConstant code, String message, Throwable cause)
    {
        return new AMQConnectionException(code, message, getClazz(), getMethod(), getMajor(), getMinor(), cause);
    }
View Full Code Here

                }
            }
            else if (!exchange.getType().equals(body.getType()))
            {

                throw new AMQConnectionException(AMQConstant.NOT_ALLOWED, "Attempt to redeclare exchange: " + body.getExchange() + " of type " + exchange.getType() + " to " + body.getType() +".",body.getClazz(), body.getMethod(),body.getMajor(),body.getMinor());
            }

        }
        if(!body.getNowait())
        {
View Full Code Here

                        _logger.info("Closing connection due to: " + e.getMessage());
                    }

                    closeSession();

                    AMQConnectionException ce =
                        evt.getMethod().getConnectionException(AMQConstant.CHANNEL_ERROR,
                            AMQConstant.CHANNEL_ERROR.getName().toString());

                    _stateManager.changeState(AMQState.CONNECTION_CLOSING);
                    writeFrame(ce.getCloseFrame(channelId));
                }
            }
            catch (AMQConnectionException e)
            {
                if (_logger.isInfoEnabled())
View Full Code Here

                    if (_logger.isInfoEnabled())
                    {
                        _logger.info("Closing connection due to: " + e.getMessage());
                    }

                    AMQConnectionException ce =
                            evt.getMethod().getConnectionException(AMQConstant.CHANNEL_ERROR,
                                                                   AMQConstant.CHANNEL_ERROR.getName().toString());

                    _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                    closeConnection(channelId, ce, false);
                }
            }
            catch (AMQConnectionException e)
            {
                _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                closeConnection(channelId, e, false);
            }
            catch (AMQSecurityException e)
            {
                AMQConnectionException ce = evt.getMethod().getConnectionException(AMQConstant.ACCESS_REFUSED, e.getMessage());
                _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                closeConnection(channelId, ce, false);
            }
        }
        catch (Exception e)
View Full Code Here

                    if (_logger.isInfoEnabled())
                    {
                        _logger.info("Closing connection due to: " + e.getMessage());
                    }

                    AMQConnectionException ce =
                            evt.getMethod().getConnectionException(AMQConstant.CHANNEL_ERROR,
                                                                   AMQConstant.CHANNEL_ERROR.getName().toString());

                    _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                    closeConnection(channelId, ce);
                }
            }
            catch (AMQConnectionException e)
            {
                _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                closeConnection(channelId, e);
            }
            catch (AMQSecurityException e)
            {
                AMQConnectionException ce = evt.getMethod().getConnectionException(AMQConstant.ACCESS_REFUSED, e.getMessage());
                _logger.info(e.getMessage() + " whilst processing:" + methodBody);
                closeConnection(channelId, ce);
            }
        }
        catch (Exception e)
View Full Code Here

TOP

Related Classes of org.apache.qpid.AMQConnectionException

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.