Package org.apache.qpid.server.protocol

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


                                                                          body.getArguments(), body.getNoLocal(), body.getExclusive());
                    if (!body.getNowait())
                    {
                        MethodRegistry methodRegistry = session.getMethodRegistry();
                        AMQMethodBody responseBody = methodRegistry.createBasicConsumeOkBody(consumerTag);
                        session.writeFrame(responseBody.generateFrame(channelId));

                    }

                   
                }
View Full Code Here


                    MethodRegistry methodRegistry = session.getMethodRegistry();
                    AMQMethodBody responseBody = methodRegistry.createChannelCloseBody(AMQConstant.INVALID_ARGUMENT.getCode(),
                                                                                       new AMQShortString(ise.getMessage()),
                                                                                       body.getClazz(),
                                                                                       body.getMethod());
                    session.writeFrame(responseBody.generateFrame(channelId));


                }
                catch (ConsumerTagNotUniqueException e)
                {
View Full Code Here

                    MethodRegistry methodRegistry = session.getMethodRegistry();
                    AMQMethodBody responseBody = methodRegistry.createConnectionCloseBody(AMQConstant.NOT_ALLOWED.getCode(),    // replyCode
                                                             msg,               // replytext
                                                             body.getClazz(),
                                                             body.getMethod());
                    session.writeFrame(responseBody.generateFrame(0));
                }
                catch (AMQQueue.ExistingExclusiveSubscription e)
                {
                    throw body.getChannelException(AMQConstant.ACCESS_REFUSED,
                                                   "Cannot subscribe to queue "
View Full Code Here

            _log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey);
        }

        MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();
        AMQMethodBody responseBody = methodRegistry.createQueueUnbindOkBody();
        session.writeFrame(responseBody.generateFrame(channelId));


    }
}
View Full Code Here

            MethodRegistry methodRegistry = session.getMethodRegistry();
            QueueDeclareOkBody responseBody =
                    methodRegistry.createQueueDeclareOkBody(queueName,
                                                            queue.getMessageCount(),
                                                            queue.getConsumerCount());
            session.writeFrame(responseBody.generateFrame(channelId));

            _logger.info("Queue " + queueName + " declared successfully");
        }
    }
View Full Code Here

        }
        if(!body.getNowait())
        {
            MethodRegistry methodRegistry = session.getMethodRegistry();
            AMQMethodBody responseBody = methodRegistry.createExchangeDeclareOkBody();
            session.writeFrame(responseBody.generateFrame(channelId));

        }
    }
}
View Full Code Here

                    store.removeQueue(queue);
                }

                MethodRegistry methodRegistry = session.getMethodRegistry();
                QueueDeleteOkBody responseBody = methodRegistry.createQueueDeleteOkBody(purged);
                session.writeFrame(responseBody.generateFrame(channelId));
            }
        }
    }
}
View Full Code Here

        {
            exchangeRegistry.unregisterExchange(body.getExchange(), body.getIfUnused());

            ExchangeDeleteOkBody responseBody = session.getMethodRegistry().createExchangeDeleteOkBody();
                       
            session.writeFrame(responseBody.generateFrame(channelId));
        }
        catch (ExchangeInUseException e)
        {
            // TODO: sort out consistent channel close mechanism that does all clean up etc.
        }
View Full Code Here

            MethodRegistry methodRegistry = session.getMethodRegistry();
            AMQMethodBody responseBody = methodRegistry.createConnectionOpenOkBody(body.getVirtualHost());

            stateManager.changeState(AMQState.CONNECTION_OPEN);

            session.writeFrame(responseBody.generateFrame(channelId));

           
        }
    }
}
View Full Code Here

                    MethodRegistry methodRegistry = session.getMethodRegistry();
                    // TODO - set clusterId
                    BasicGetEmptyBody responseBody = methodRegistry.createBasicGetEmptyBody(null);


                    session.writeFrame(responseBody.generateFrame(channelId));
                }
            }
        }
    }
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.