Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.ProtocolInitiation


    public void init()
    {
        // start the process of setting up the connection. This is the first place that
        // data is written to the server.
        _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 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

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

            _sender.send(asByteBuffer(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion())));
            _sender.flush();
        }
    }
View Full Code Here

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

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

    {
        // 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

        }
        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

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

            _sender.send(asByteBuffer(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion())));
            _sender.flush();
        }
    }
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.