Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.ProtocolInitiation


    {
        // start the process of setting up the connection. This is the first place that
        // data is written to the server.
        initialiseTuneParameters(settings);

        _protocolHandler.writeFrame(new ProtocolInitiation(_connection.getProtocolVersion()));
    }
View Full Code Here


                    else if (message instanceof ProtocolInitiation)
                    {
                        // We get here if the server sends a response to our initial protocol header
                        // suggesting an alternate ProtocolVersion; the server will then close the
                        // connection.
                        ProtocolInitiation protocolInit = (ProtocolInitiation) message;
                        _suggestedProtocolVersion = protocolInit.checkVersion();
                        _logger.info("Broker suggested using protocol version:" + _suggestedProtocolVersion);

                        // get round a bug in old versions of qpid whereby the connection is not closed
                        _stateManager.changeState(AMQState.CONNECTION_CLOSED);
                    }
View Full Code Here

            else
            {
                enoughData = _piDecoder.decodable(msg);
                if (enoughData)
                {
                    dataBlocks.add(new ProtocolInitiation(msg));
                }

            }

            if(!enoughData)
View Full Code Here

            // call us again when more data has been read
            return false;
        }
        else
        {
            ProtocolInitiation pi = new ProtocolInitiation(in.buf());
            out.write(pi);

            return true;
        }
    }
View Full Code Here

                && (msg.remaining() > 0)
                && (msg.get(msg.position()) == (byte)'A')))
        {
            if (_piDecoder.decodable(msg.buf()))
            {
                dataBlocks.add(new ProtocolInitiation(msg.buf()));
            }
        }
        else
        {
            boolean enoughData = true;
View Full Code Here

        }
        catch (AMQException e)
        {
            _logger.info("Received unsupported protocol initiation for protocol version: " + getProtocolVersion());

            _networkDriver.send(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion()).toNioByteBuffer());
        }
    }
View Full Code Here

    public void exception(Throwable throwable)
    {
        if (throwable instanceof AMQProtocolHeaderException)
        {

            writeFrame(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion()));
            _networkDriver.close();

            _logger.error("Error in protocol initiation " + this + ":" + getRemoteAddress() + " :" + throwable.getMessage(), throwable);
        }
        else if (throwable instanceof IOException)
View Full Code Here

                            else if (message instanceof ProtocolInitiation)
                            {
                                // We get here if the server sends a response to our initial protocol header
                                // suggesting an alternate ProtocolVersion; the server will then close the
                                // connection.
                                ProtocolInitiation protocolInit = (ProtocolInitiation) message;
                                _suggestedProtocolVersion = protocolInit.checkVersion();
                               
                                // get round a bug in old versions of qpid whereby the connection is not closed
                                _stateManager.changeState(AMQState.CONNECTION_CLOSED);
                            }
                        }
View Full Code Here

        }
        catch (AMQException e)
        {
            _logger.info("Received unsupported protocol initiation for protocol version: " + getProtocolVersion());

            _networkDriver.send(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion()).toNioByteBuffer());
        }
    }
View Full Code Here

    public void exception(Throwable throwable)
    {
        if (throwable instanceof AMQProtocolHeaderException)
        {
            writeFrame(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion()));
            _networkDriver.close();

            _logger.error("Error in protocol initiation " + this + ":" + getRemoteAddress() + " :" + throwable.getMessage(), throwable);
        }
        else if (throwable instanceof IOException)
View Full Code Here

TOP

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

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.