Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.Session$DefaultSessionListener


        messageAcknowledge(ranges,accept,false);
    }
   
    void messageAcknowledge(final RangeSet ranges, final boolean accept, final boolean setSyncBit)
    {
        final Session ssn = getQpidSession();
        flushProcessed(ranges,accept);
        if (accept)
        {
            ssn.messageAccept(ranges, UNRELIABLE, setSyncBit ? SYNC : NONE);
        }
    }
View Full Code Here


     * @param ranges the range of command ids.
     * @param batch true if batched.
     */
    void flushProcessed(final RangeSet ranges, final boolean batch)
    {
        final Session ssn = getQpidSession();
        for (final Range range : ranges)
        {
            ssn.processed(range);
        }
        ssn.flushProcessed(batch ? BATCH : NONE);
    }
View Full Code Here

        if(_state == State.OPERATIONAL && (_activeBridges.putIfAbsent(bridge,bridge) == null))
        {


            Session session = _qpidConnection.createSession("Bridge("
                                                            + (bridge.isDurable() ? "durable" : "transient")
                                                            + "," + (bridge.isDynamic() ? "dynamic" : "static")
                                                            + "," + (bridge.isQueueBridge() ? "queue" : "exchange")
                                                            + "," + (bridge.isLocalSource() ? "local-src" : "remote-src")
                                                            + ",[Source: '" + bridge.getSource() + "']"
View Full Code Here

        }
    }

    protected Session createSession()
    {
        Session qpidSession;
        if (_name == null)
        {
            qpidSession = _qpidConnection.createSession(1);
        }
        else
        {
            qpidSession = _qpidConnection.createSession(_name,1);
        }
        if (isTransacted())
        {
            qpidSession.txSelect();
            qpidSession.setTransacted(true);
        }
        qpidSession.setSessionListener(this);

        return qpidSession;
    }
View Full Code Here

        messageAcknowledge(ranges,accept,false);
    }

    void messageAcknowledge(final RangeSet ranges, final boolean accept, final boolean setSyncBit)
    {
        final Session ssn = getQpidSession();
        flushProcessed(ranges,accept);
        if (accept)
        {
            ssn.messageAccept(ranges, UNRELIABLE, setSyncBit ? SYNC : NONE);
        }
    }
View Full Code Here

     * @param ranges the range of command ids.
     * @param batch true if batched.
     */
    void flushProcessed(final RangeSet ranges, final boolean batch)
    {
        final Session ssn = getQpidSession();
        for (final Range range : ranges)
        {
            ssn.processed(range);
        }
        ssn.flushProcessed(batch ? BATCH : NONE);
    }
View Full Code Here

    private void declareQueue(String exch, String routkey, String qname) throws Exception
    {
        Connection conn = new Connection();
        conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
        Session sess = conn.createSession(0);
        sess.exchangeDeclare(exch, "direct", null, null);
        sess.queueDeclare(qname, null, null);
        sess.exchangeBind(qname, exch, routkey, null);
        sess.sync();
        conn.close();       
    }
View Full Code Here

        messageAcknowledge(ranges,accept,false);
    }
   
    void messageAcknowledge(RangeSet ranges, boolean accept,boolean setSyncBit)
    {
        Session ssn = getQpidSession();
        for (Range range : ranges)
        {
            ssn.processed(range);
        }
        ssn.flushProcessed(accept ? BATCH : NONE);
        if (accept)
        {
            ssn.messageAccept(ranges, UNRELIABLE,setSyncBit? SYNC : NONE);
        }
    }
View Full Code Here

        if(_state == State.OPERATIONAL && (_activeBridges.putIfAbsent(bridge,bridge) == null))
        {


            Session session = _qpidConnection.createSession("Bridge("
                                                            + (bridge.isDurable() ? "durable" : "transient")
                                                            + "," + (bridge.isDynamic() ? "dynamic" : "static")
                                                            + "," + (bridge.isQueueBridge() ? "queue" : "exchange")
                                                            + "," + (bridge.isLocalSource() ? "local-src" : "remote-src")
                                                            + ",[Source: '" + bridge.getSource() + "']"
View Full Code Here

        }
    }

    protected Session createSession()
    {
        Session qpidSession;
        if (_name == null)
        {
            qpidSession = _qpidConnection.createSession(1);
        }
        else
        {
            qpidSession = _qpidConnection.createSession(_name,1);
        }
        if (isTransacted())
        {
            qpidSession.txSelect();
            qpidSession.setTransacted(true);
        }
        qpidSession.setSessionListener(this);

        return qpidSession;
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.Session$DefaultSessionListener

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.