Package org.apache.qpid

Examples of org.apache.qpid.QpidException


        {
            synchronized (_currentExceptionLock)
            {
                // todo check the error code for finding out if we need to notify the
                // JMS connection exception listener
                _currentException = new QpidException(reason, errorCode, t);
            }
        }
View Full Code Here


                System.out.println("message rejected: " +
                        session.getCommand((int) l));
            }
        }
        ((ClientSession)session).setRejectedMessages(struct.getTransfers());
        ((ClientSession)session).notifyException(new QpidException("Message Rejected",ErrorCode.MESSAGE_REJECTED,null));
        session.processed(struct);
    }
View Full Code Here

                super.connectionClose(context, connectionClose);
                ErrorCode errorCode = ErrorCode.get(connectionClose.getReplyCode().getValue());
                if (_closedListner == null && errorCode != ErrorCode.NO_ERROR)
                {
                    throw new RuntimeException
                        (new QpidException("Server closed the connection: Reason " +
                                           connectionClose.getReplyText(),
                                           errorCode,
                                           null));
                }
                else
View Full Code Here

        {
            parser = new URLParser_0_10(url);
        }
        catch(Exception e)
        {
            throw new QpidException("Error parsing the URL",ErrorCode.UNDEFINED,e);
        }
        List<BrokerDetails> brokers = parser.getAllBrokerDetails();
        BrokerDetails brokerDetail = brokers.get(0);
        connect(brokerDetail.getHost(), brokerDetail.getPort(), brokerDetail.getProperty("virtualhost"),
                brokerDetail.getProperty("username")== null? "guest":brokerDetail.getProperty("username"),
View Full Code Here

                    closeOk.await(timeout - elapsed, TimeUnit.MILLISECONDS);
                    elapsed = System.currentTimeMillis() - start;
                }
                if(!closed)
                {
                    throw new QpidException("Timed out when closing connection", ErrorCode.CONNECTION_ERROR, null);
                }
            }
            catch (InterruptedException e)
            {
                 throw new QpidException("Interrupted when closing connection", ErrorCode.CONNECTION_ERROR, null);
            }
        }
        finally
        {
            _lock.unlock();
View Full Code Here

    {
        synchronized (_currentExceptionLock)
        {
            if (_currentException != null)
            {
                QpidException toBeThrown = _currentException;
                _currentException = null;
                throw new AMQException(AMQConstant.getConstant(toBeThrown.getErrorCode().getCode()),
                                       toBeThrown.getMessage(), toBeThrown);
            }
        }
    }
View Full Code Here

                }
                return message.getObjectProperty(name);
            }
            catch(JMSException e)
            {
                throw new QpidException("Exception evaluating properties for filter", ErrorCode.INTERNAL_ERROR, e);
            }
        }
    }
View Full Code Here

            int b = input.readByte();
            _globalTransactionID = new byte[g];
            _branchQualifier = new byte[b];
            if (input.read(_globalTransactionID, 0, g) != g)
            {
                throw new QpidException("Cannot convert the string " + xid + " into an Xid", null, null);
            }
            if (input.read(_branchQualifier, 0, b) != b)
            {
                throw new QpidException("Cannot convert the string " + xid + " into an Xid", null, null);
            }
        }
        catch (IOException e)
        {
            throw new QpidException("cannot convert the string " + xid + " into an Xid", null, e);
        }
    }
View Full Code Here

                }
                return message.getObjectProperty(name);
            }
            catch(JMSException e)
            {
                throw new QpidException("Exception evaluating properties for filter", ErrorCode.INTERNAL_ERROR, e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.QpidException

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.