Examples of generateFrame()


Examples of org.apache.qpid.framing.ConnectionSecureOkBody.generateFrame()

            // Evaluate server challenge
            byte[] response = client.evaluateChallenge(body.getChallenge());

            ConnectionSecureOkBody secureOkBody = session.getMethodRegistry().createConnectionSecureOkBody(response);

            session.writeFrame(secureOkBody.generateFrame(channelId));
        }
        catch (SaslException e)
        {
            throw new AMQException(null, "Error processing SASL challenge: " + e, e);
        }
View Full Code Here

Examples of org.apache.qpid.framing.ConnectionStartOkBody.generateFrame()

                ConnectionStartOkBody connectionStartOkBody = session.getMethodRegistry().createConnectionStartOkBody(clientProperties,new AMQShortString(mechanism),saslResponse,new AMQShortString(locales));
                // 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(connectionStartOkBody.generateFrame(channelId));

            }
            catch (UnsupportedEncodingException e)
            {
                throw new AMQException(null, "Unable to decode data: " + e, e);
View Full Code Here

Examples of org.apache.qpid.framing.ConnectionTuneBody.generateFrame()

                    stateManager.changeState(AMQState.CONNECTION_NOT_TUNED);

                    ConnectionTuneBody tuneBody = methodRegistry.createConnectionTuneBody((Integer)broker.getAttribute(Broker.CONNECTION_SESSION_COUNT_LIMIT),
                                                                                          BrokerProperties.FRAME_SIZE,
                                                                                          (Integer)broker.getAttribute(Broker.CONNECTION_HEART_BEAT_DELAY));
                    session.writeFrame(tuneBody.generateFrame(0));
                    break;
                case CONTINUE:
                    stateManager.changeState(AMQState.CONNECTION_NOT_AUTH);

                    ConnectionSecureBody secureBody = methodRegistry.createConnectionSecureBody(authResult.getChallenge());
View Full Code Here

Examples of org.apache.qpid.framing.ConnectionTuneBody.generateFrame()

                ConnectionTuneBody tuneBody =
                        methodRegistry.createConnectionTuneBody((Integer)broker.getAttribute(Broker.CONNECTION_SESSION_COUNT_LIMIT),
                                                                BrokerProperties.FRAME_SIZE,
                                                                (Integer)broker.getAttribute(Broker.CONNECTION_HEART_BEAT_DELAY));
                session.writeFrame(tuneBody.generateFrame(0));
                session.setAuthorizedSubject(authResult.getSubject());
                disposeSaslServer(session);
                break;
            case CONTINUE:
                stateManager.changeState(AMQState.CONNECTION_NOT_AUTH);
View Full Code Here

Examples of org.apache.qpid.framing.ConnectionTuneBody.generateFrame()

                ConnectionTuneBody tuneBody =
                        methodRegistry.createConnectionTuneBody(ApplicationRegistry.getInstance().getConfiguration().getMaxChannelCount(),
                                                                ConnectionStartOkMethodHandler.getConfiguredFrameSize(),
                                                                ApplicationRegistry.getInstance().getConfiguration().getHeartBeatDelay());
                session.writeFrame(tuneBody.generateFrame(0));
                session.setAuthorizedSubject(authResult.getSubject());
                disposeSaslServer(session);
                break;
            case CONTINUE:
                stateManager.changeState(AMQState.CONNECTION_NOT_AUTH);
View Full Code Here

Examples of org.apache.qpid.framing.ConnectionTuneOkBody.generateFrame()

        ConnectionTuneOkBody tuneOkBody = methodRegistry.createConnectionTuneOkBody(params.getChannelMax(),
                                                                                    params.getFrameMax(),
                                                                                    params.getHeartbeat());
        // Be aware of possible changes to parameter order as versions change.
        session.writeFrame(tuneOkBody.generateFrame(channelId));

        String host = session.getAMQConnection().getVirtualHost();
        AMQShortString virtualHost = new AMQShortString("/" + host);

        ConnectionOpenBody openBody = methodRegistry.createConnectionOpenBody(virtualHost,null,true);
View Full Code Here

Examples of org.apache.qpid.framing.ExchangeBoundOkBody.generateFrame()

                response = methodRegistry.createExchangeBoundOkBody(NO_QUEUE_BOUND_WITH_RK,  // replyCode
                    new AMQShortString("No queue bound with routing key " + body.getRoutingKey() +
                    " to exchange " + exchangeName))// replyText
            }
        }
        session.writeFrame(response.generateFrame(channelId));
    }
}
View Full Code Here

Examples of org.apache.qpid.framing.ExchangeDeclareBody.generateFrame()

                                                   false,
                                                   false,
                                                   false,
                                                   nowait,
                                                   null);
                AMQFrame exchangeDeclare = body.generateFrame(channelId);
                AMQProtocolHandler protocolHandler = ((AMQConnection) _connection).getProtocolHandler();


                if (nowait)
                {
View Full Code Here

Examples of org.apache.qpid.framing.ExchangeDeleteBody.generateFrame()

        {
            MethodRegistry_8_0 registry = new MethodRegistry_8_0();

            ExchangeDeleteBody body = registry.createExchangeDeleteBody(0, new AMQShortString(_name), false, true);

            AMQFrame exchangeDeclare = body.generateFrame(0);

            ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare, ExchangeDeleteOkBody.class);
        }

        //Wait and ensure we get our last EXH-1002 msg
View Full Code Here

Examples of org.apache.qpid.framing.ExchangeDeleteOkBody.generateFrame()

            virtualHost.removeExchange(exchange, !body.getIfUnused());

            ExchangeDeleteOkBody responseBody = session.getMethodRegistry().createExchangeDeleteOkBody();

            session.writeFrame(responseBody.generateFrame(channelId));
        }
        catch (ExchangeInUseException e)
        {
            throw body.getChannelException(AMQConstant.IN_USE, "Exchange in use");
            // TODO: sort out consistent channel close mechanism that does all clean up etc.
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.