Examples of writeFrame()


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

        if (!body.getNowait())
        {
            channel.sync();
            MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();
            AMQMethodBody responseBody = methodRegistry.createQueueBindOkBody();
            protocolConnection.writeFrame(responseBody.generateFrame(channelId));

        }
    }
}
View Full Code Here

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

                if(!body.getNowait())
                {
                    channel.sync();
                    MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();
                    AMQMethodBody responseBody = methodRegistry.createQueuePurgeOkBody(purged);
                    protocolConnection.writeFrame(responseBody.generateFrame(channelId));

                }
        }
    }
}
View Full Code Here

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

        {
            throw new AMQException(AMQConstant.COMMAND_INVALID, "AccessRequest not present in AMQP versions other than 0-8, 0-9");
        }

        channel.sync();
        session.writeFrame(response.generateFrame(channelId));
    }
}
View Full Code Here

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

        if (!body.getNowait())
        {
            MethodRegistry methodRegistry = session.getMethodRegistry();
            BasicCancelOkBody cancelOkBody = methodRegistry.createBasicCancelOkBody(body.getConsumerTag());
            channel.sync();
            session.writeFrame(cancelOkBody.generateFrame(channelId));
        }
    }
}
View Full Code Here

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

            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

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

        // In Qpid 0-9 we create a separate sync-recover, sync-recover-ok pair to be "more" compliant
        if(session.getProtocolVersion().equals(ProtocolVersion.v0_9))
        {
            MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();
            AMQMethodBody recoverOk = methodRegistry.createBasicRecoverSyncOkBody();
            session.writeFrame(recoverOk.generateFrame(channelId));

        }
        else if(session.getProtocolVersion().equals(ProtocolVersion.v0_91))
        {
            MethodRegistry_0_91 methodRegistry = (MethodRegistry_0_91) session.getMethodRegistry();
View Full Code Here

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

        }
        else if(session.getProtocolVersion().equals(ProtocolVersion.v0_91))
        {
            MethodRegistry_0_91 methodRegistry = (MethodRegistry_0_91) session.getMethodRegistry();
            AMQMethodBody recoverOk = methodRegistry.createBasicRecoverSyncOkBody();
            session.writeFrame(recoverOk.generateFrame(channelId));

        }

    }
}
View Full Code Here

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

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

            stateManager.changeState(AMQState.CONNECTION_OPEN);

            session.writeFrame(responseBody.generateFrame(channelId));
        }
    }
}
View Full Code Here

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

            _logger.error("Error closing protocol session: " + e, e);
        }

        MethodRegistry methodRegistry = session.getMethodRegistry();
        ConnectionCloseOkBody responseBody = methodRegistry.createConnectionCloseOkBody();
        session.writeFrame(responseBody.generateFrame(channelId));

        session.closeProtocolSession();

    }
}
View Full Code Here

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

        channel.setSuspended(!body.getActive());
        _logger.debug("Channel.Flow for channel " + channelId + ", active=" + body.getActive());

        MethodRegistry methodRegistry = session.getMethodRegistry();
        AMQMethodBody responseBody = methodRegistry.createChannelFlowOkBody(body.getActive());
        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.