Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.AMQFrameDecodingException


                return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)),
                        bodySize);
            }
            catch (IOException e)
            {
                throw new AMQFrameDecodingException(null, e.getMessage(), e);
            }
        }
View Full Code Here


    /**
     * Test that a subclass of AMQException that has the default constructor will be correctly created and rethrown.
     */
    public void testRethrowAMQESubclass()
    {
        AMQFrameDecodingException test = new AMQFrameDecodingException(AMQConstant.INTERNAL_ERROR,
                                                                       "Error",
                                                                       new Exception());
        AMQException e = reThrowException(test);

        assertEquals("Exception not of correct class", AMQFrameDecodingException.class, e.getClass());
View Full Code Here

    /**
     * Test that a subclass of AMQException that has the default constructor will be correctly created and rethrown.
     */
    public void testRethrowAMQESubclass()
    {
        AMQFrameDecodingException test = new AMQFrameDecodingException(AMQConstant.INTERNAL_ERROR,
                                                                       "Error",
                                                                       new Exception());
        AMQException e = reThrowException(test);

        assertEquals("Exception not of correct class", AMQFrameDecodingException.class, e.getClass());
View Full Code Here

    /**
     * Test that a subclass of AMQException that has the default constructor will be correctly created and rethrown.
     */
    public void testRethrowAMQESubclass()
    {
        AMQFrameDecodingException test = new AMQFrameDecodingException(AMQConstant.INTERNAL_ERROR,
                                                                       "Error",
                                                                       new Exception());
        AMQException e = reThrowException(test);

        assertEquals("Exception not of correct class", AMQFrameDecodingException.class, e.getClass());
View Full Code Here

                bodyFactory = _bodiesSupported[type];
            }

            if (bodyFactory == null)
            {
                throw new AMQFrameDecodingException(null, "Unsupported frame type: " + type, null);
            }

            final int channel = in.getUnsignedShort();
            final long bodySize = in.getUnsignedInt();

            // bodySize can be zero
            if ((channel < 0) || (bodySize < 0))
            {
                throw new AMQFrameDecodingException(null, "Undecodable frame: type = " + type + " channel = " + channel
                    + " bodySize = " + bodySize, null);
            }

            AMQFrame frame = new AMQFrame(in, channel, bodySize, bodyFactory);

            byte marker = in.get();
            if ((marker & 0xFF) != 0xCE)
            {
                throw new AMQFrameDecodingException(null, "End of frame marker not found. Read " + marker + " length=" + bodySize
                    + " type=" + type, null);
            }

            try
            {
View Full Code Here

                return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)),
                        bodySize);
            }
            catch (IOException e)
            {
                throw new AMQFrameDecodingException(null, e.getMessage(), e);
            }
        }
View Full Code Here

                return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)),
                        bodySize);
            }
            catch (IOException e)
            {
                throw new AMQFrameDecodingException(null, e.getMessage(), e);
            }
        }
View Full Code Here

                return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)),
                        bodySize);
            }
            catch (IOException e)
            {
                throw new AMQFrameDecodingException(null, e.getMessage(), e);
            }
        }
View Full Code Here

                return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)),
                        bodySize);
            }
            catch (IOException e)
            {
                throw new AMQFrameDecodingException(null, e.getMessage(), e);
            }
        }
View Full Code Here

        {
            return ContentHeaderBody.createFromBuffer(new DataInputStream(new ByteArrayInputStream(underlying)), bodySize);
        }
        catch (IOException e)
        {
            throw new AMQFrameDecodingException(null, e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.framing.AMQFrameDecodingException

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.