Package org.apache.qpid

Examples of org.apache.qpid.AMQException


                    }
                }
            }
            if (!wasAnyoneInterested)
            {
                throw new AMQException(null, "AMQMethodEvent " + evt + " was not processed by any listener.  Listeners:"
                                             + _frameListeners, null);
            }
        }
        catch (AMQException e)
        {
View Full Code Here


                    Exception e = _stateManager.getLastException();
                    if (e != null)
                    {
                        if (e instanceof AMQException)
                        {
                            AMQException amqe = (AMQException) e;

                            throw amqe.cloneForCurrentThread();
                        }
                        else
                        {
                            throw new AMQException(AMQConstant.INTERNAL_ERROR, e.getMessage(), e);
                        }
                    }
                }

                _frameListeners.add(listener);
View Full Code Here

        catch (SessionException se)
        {
            setCurrentException(se);
        }

        AMQException amqe = getCurrentException();
        if (amqe != null)
        {
            throw amqe;
        }
    }
View Full Code Here

                        .messageFlow(consumerTag, MessageCreditUnit.BYTE, 0xFFFFFFFF,
                                     Option.UNRELIABLE);
                }
                catch (Exception e)
                {
                    throw new AMQException(AMQConstant.INTERNAL_ERROR, "Error while trying to get the listener", e);
                }
            }
        }
        // We need to sync so that we get notify of an error.
        sync();
View Full Code Here

     *
     * @throws SessionException get the latest thrown error.
     */
    public AMQException getCurrentException()
    {
        AMQException amqe = null;
        synchronized (_currentExceptionLock)
        {
            if (_currentException != null)
            {
                amqe = _currentException;
View Full Code Here

        catch (SessionException se)
        {
            setCurrentException(se);
        }

        AMQException amqe = getCurrentException();
        if (amqe != null)
        {
            throw amqe;
        }
    }
View Full Code Here

            int code = AMQConstant.INTERNAL_ERROR.getCode();
            if (ee != null)
            {
                code = ee.getErrorCode().getValue();
            }
            AMQException amqe = new AMQException(AMQConstant.getConstant(code), _isHardError, se.getMessage(), se.getCause());
            _currentException = amqe;
        }
        if (!_isHardError)
        {
            cancelTimerTask();
View Full Code Here

            {
                match = false;
            }
            else
            {
                throw new AMQException(AMQConstant.getConstant(e.getException().getErrorCode().getValue()),
                        "Error querying queue",e);
            }
        }
       
        return match;
View Full Code Here

                        break;
                    }
                }
               
                default:
                    throw new AMQException(
                            "The name '" + dest.getAddressName() +
                            "' supplied in the address doesn't resolve to an exchange or a queue");
            }
            dest.setAddressResolved(System.currentTimeMillis());
        }
View Full Code Here

            } else if (result.getQueueNotFound()) {
                //name refers to an exchange
                type = AMQDestination.TOPIC_TYPE;
            } else {
                //both a queue and exchange exist for that name
                throw new AMQException("Ambiguous address, please specify queue or topic as node type");
            }
            dest.setAddressType(type);
            dest.rebuildTargetAndSourceNodes(type);
            return type;
        }       
View Full Code Here

TOP

Related Classes of org.apache.qpid.AMQException

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.