Package org.apache.qpid.server.protocol

Examples of org.apache.qpid.server.protocol.AMQProtocolSession.writeFrame()


        {
            ((ClusteredQueue) queue).addRemoteSubcriber(ClusteredProtocolSession.getSessionPeer(session));
            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            session.writeFrame(BasicConsumeOkBody.createAMQFrame(evt.getChannelId(),
              (byte)8, (byte)0// AMQP version (major, minor)
              evt.getMethod().queue  // consumerTag
                ));
        }
        else
View Full Code Here


        session.addChannel(channel);
        // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
        // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
        // Be aware of possible changes to parameter order as versions change.
        AMQFrame response = ChannelOpenOkBody.createAMQFrame(evt.getChannelId(), (byte)8, (byte)0);
        session.writeFrame(response);
    }
}
View Full Code Here

        // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
        // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
        // Be aware of possible changes to parameter order as versions change.
        AMQFrame response = ChannelCloseOkBody.createAMQFrame(evt.getChannelId(), (byte) 8, (byte) 0);
        session.writeFrame(response);
    }
}
View Full Code Here

                    if (!body.nowait)
                    {
                        // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
                        // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
                        // Be aware of possible changes to parameter order as versions change.
                        session.writeFrame(BasicConsumeOkBody.createAMQFrame(channelId,
                                                                             (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                             consumerTag));        // consumerTag
                    }

                    //now allow queue to start async processing of any backlog of messages
View Full Code Here

                    // Why doesn't this ChannelException work.
//                    throw body.getChannelException(AMQConstant.INVALID_ARGUMENT, ise.getMessage());
                    // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
                    // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
                    // Be aware of possible changes to parameter order as versions change.
                    session.writeFrame(ChannelCloseBody.createAMQFrame(channelId,
                                                                       (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                       BasicConsumeBody.getClazz((byte) 8, (byte) 0),    // classId
                                                                       BasicConsumeBody.getMethod((byte) 8, (byte) 0),    // methodId
                                                                       AMQConstant.INVALID_ARGUMENT.getCode(),    // replyCode
                                                                       new AMQShortString(ise.getMessage())));        // replyText
View Full Code Here

//                    throw body.getConnectionException(AMQConstant.NOT_ALLOWED,
//                                                      "Non-unique consumer tag, '" + body.consumerTag + "'");
                    // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
                    // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
                    // Be aware of possible changes to parameter order as versions change.
                    session.writeFrame(ConnectionCloseBody.createAMQFrame(channelId,
                                                                          (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                          BasicConsumeBody.getClazz((byte) 8, (byte) 0),    // classId
                                                                          BasicConsumeBody.getMethod((byte) 8, (byte) 0),    // methodId
                                                                          AMQConstant.NOT_ALLOWED.getCode(),    // replyCode
                                                                          msg));    // replyText
View Full Code Here

                                                                        (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                        ConnectionCloseBody.getClazz((byte) 8, (byte) 0),        // classId
                                                                        ConnectionCloseBody.getMethod((byte) 8, (byte) 0),    // methodId
                                                                        AMQConstant.NOT_ALLOWED.getCode(),    // replyCode
                                                                        AMQConstant.NOT_ALLOWED.getName());    // replyText
                    session.writeFrame(close);
                    disposeSaslServer(session);
                    break;

                case SUCCESS:
                    _logger.info("Connected as: " + ss.getAuthorizationID());
View Full Code Here

                    AMQFrame tune = ConnectionTuneBody.createAMQFrame(0,
                                                                      (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                      Integer.MAX_VALUE,    // channelMax
                                                                      getConfiguredFrameSize(),    // frameMax
                                                                      HeartbeatConfig.getInstance().getDelay());    // heartbeat
                    session.writeFrame(tune);
                    break;
                case CONTINUE:
                    stateManager.changeState(AMQState.CONNECTION_NOT_AUTH);
                    // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
                    // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
View Full Code Here

                    // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
                    // Be aware of possible changes to parameter order as versions change.
                    AMQFrame challenge = ConnectionSecureBody.createAMQFrame(0,
                                                                             (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                             authResult.challenge);    // challenge
                    session.writeFrame(challenge);
            }
        }
        catch (SaslException e)
        {
            disposeSaslServer(session);
View Full Code Here

                                                                  (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                  queue.getConsumerCount(), // consumerCount
                                                                  queue.getMessageCount(), // messageCount
                                                                  body.queue); // queue
            _log.info("Queue " + body.queue + " declared successfully");
            session.writeFrame(response);
        }
    }

    protected AMQShortString createName()
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.