Package org.apache.qpid.codec

Examples of org.apache.qpid.codec.AMQCodecFactory


    public AMQProtocolHandler(AMQConnection con)
    {
        _connection = con;
        _protocolSession = new AMQProtocolSession(this, _connection);
        _stateManager = new AMQStateManager(_protocolSession);
        _codecFactory = new AMQCodecFactory(false, _protocolSession);
        _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
        _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);
        _poolReference.acquireExecutorService();
        _failoverHandler = new FailoverHandler(this);
    }
View Full Code Here


    public void sessionCreated(IoSession session) throws Exception
    {
        _logger.debug("Protocol session created for session " + System.identityHashCode(session));
        _failoverHandler = new FailoverHandler(this, session);

        final ProtocolCodecFilter pcf = new ProtocolCodecFilter(new AMQCodecFactory(false));

        if (Boolean.getBoolean("amqj.shared_read_write_pool"))
        {
            session.getFilterChain().addBefore("AsynchronousWriteFilter", "protocolFilter", pcf);
        }
View Full Code Here

    }

    public void sessionCreated(IoSession protocolSession) throws Exception
    {
        SessionUtil.initialize(protocolSession);
        final AMQCodecFactory codecFactory = new AMQCodecFactory(true);

        createSession(protocolSession, _applicationRegistry, codecFactory);
        _logger.info("Protocol session created for:" + protocolSession.getRemoteAddress());

        final QpidProtocolCodecFilter pcf = new QpidProtocolCodecFilter(codecFactory);
View Full Code Here

    }

    static AMQProtocolSession createSession() throws Exception
    {
        IApplicationRegistry reg = ApplicationRegistry.getInstance();
        AMQCodecFactory codecFactory = new AMQCodecFactory(true);
        AMQMinaProtocolSession result = new AMQMinaProtocolSession(new MockIoSession(), reg.getQueueRegistry(), reg.getExchangeRegistry(), codecFactory);
        result.addChannel(new AMQChannel(1, null, null));
        return result;
    }
View Full Code Here

    public AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry, NetworkDriver driver)
    {
        _stateManager = new AMQStateManager(virtualHostRegistry, this);
        _networkDriver = driver;

        _codecFactory = new AMQCodecFactory(true, this);
        _poolReference.acquireExecutorService();
        _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
        _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);

        _actor = new AMQPConnectionActor(this, virtualHostRegistry.getApplicationRegistry().getRootMessageLogger());
View Full Code Here

    public AMQProtocolHandler(AMQConnection con)
    {
        _connection = con;
        _protocolSession = new AMQProtocolSession(this, _connection);
        _stateManager = new AMQStateManager(_protocolSession);
        _codecFactory = new AMQCodecFactory(false, _protocolSession);
        _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
        _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);
        _poolReference.acquireExecutorService();
        _failoverHandler = new FailoverHandler(this);
    }
View Full Code Here

    }

    public AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry, NetworkConnection network, final long connectionId)
    {
        _stateManager = new AMQStateManager(virtualHostRegistry, this);
        _codecFactory = new AMQCodecFactory(true, this);

        setNetworkConnection(network);
        _connectionID = connectionId;

        _actor = new AMQPConnectionActor(this, virtualHostRegistry.getApplicationRegistry().getRootMessageLogger());
View Full Code Here

    public AMQProtocolHandler(AMQConnection con)
    {
        _connection = con;
        _protocolSession = new AMQProtocolSession(this, _connection);
        _stateManager = new AMQStateManager(_protocolSession);
        _codecFactory = new AMQCodecFactory(false, _protocolSession);
        _failoverHandler = new FailoverHandler(this);
    }
View Full Code Here

    {
        super.setUp();

        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
        _protocolSession =
            new AMQMinaProtocolSession(new MockIoSession(), appRegistry.getVirtualHostRegistry(), new AMQCodecFactory(true),
                null);
        _protocolSession.setVirtualHost(appRegistry.getVirtualHostRegistry().getVirtualHost("test"));
        _channel = new AMQChannel(_protocolSession, 1, _messageStore);
        _protocolSession.addChannel(_channel);
        _mbean = (AMQProtocolSessionMBean) _protocolSession.getManagedObject();
View Full Code Here

    public void testChannels() throws Exception
    {
        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
        AMQMinaProtocolSession _protocolSession = new AMQMinaProtocolSession(new MockIoSession(),
                                                                             appRegistry.getVirtualHostRegistry(),
                                                                             new AMQCodecFactory(true),
                                                                             null);
        _protocolSession.setVirtualHost(appRegistry.getVirtualHostRegistry().getVirtualHost("test"));

        // check the channel count is correct
        int channelCount = _protocolSession.getChannels().size();
View Full Code Here

TOP

Related Classes of org.apache.qpid.codec.AMQCodecFactory

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.