Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.Connection


    //--- constructor
    public AMQConnectionDelegate_0_10(AMQConnection conn)
    {
        _conn = conn;
        _qpidConnection = new Connection();
        _qpidConnection.addConnectionListener(this);
    }
View Full Code Here


            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
            QpidBrokerTestCase.DEFAULT_SSL_PORT +
            "?ssl='true'&ssl_cert_alias='" + CERT_ALIAS_APP1 + "''";
           
            AMQTestConnection_0_10 con = new AMQTestConnection_0_10(url);     
            Connection transportCon = con.getConnection();
            String userID = transportCon.getSecurityLayer().getUserID();
            assertEquals("The correct certificate was not choosen","app1@acme.org",userID);
            con.close();
           
            url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
            QpidBrokerTestCase.DEFAULT_SSL_PORT +
            "?ssl='true'&ssl_cert_alias='" + CERT_ALIAS_APP2 + "''";
           
            con = new AMQTestConnection_0_10(url);     
            transportCon = con.getConnection();
            userID = transportCon.getSecurityLayer().getUserID();
            assertEquals("The correct certificate was not choosen","app2@acme.org",userID);
            con.close();
        }       
    }
View Full Code Here

                throw new RuntimeException(e);
            }
        }


        _qpidConnection = new Connection();
        _connectionConfig = new ConnectionConfigAdapter();
        _qpidConnection.addConnectionListener(this);


        makeConnection();
View Full Code Here

            catch (AMQStoreException e)
            {
                throw new RuntimeException(e);
            }
        }
        _qpidConnection = new Connection();
        _connectionConfig = new ConnectionConfigAdapter();
        _qpidConnection.addConnectionListener(this);

        makeConnection();
    }
View Full Code Here

    //--- constructor
    public AMQConnectionDelegate_0_10(AMQConnection conn)
    {
        _conn = conn;
        _qpidConnection = new Connection();
        _qpidConnection.addConnectionListener(this);
    }
View Full Code Here

    //--- constructor
    public AMQConnectionDelegate_0_10(AMQConnection conn)
    {
        _conn = conn;
        _qpidConnection = new Connection();
        _qpidConnection.addConnectionListener(this);
    }
View Full Code Here

        assertEquals(m.getText(), data);
    }

    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

        _durable = durable;
        _authMechanism = authMechanism;
        _username = username;
        _password = password;
        _id = virtualHost.getConfigStore().createId();
        _qpidConnection = new Connection();
        _connectionConfig = new ConnectionConfigAdapter();
        _qpidConnection.addConnectionListener(this);


        makeConnection();
View Full Code Here

        {
            e.printStackTrace();
        }

        NioSender sender = new NioSender(_ch);
        Connection con = new Connection();
        con.setSender(new Disassembler(sender, 64*1024 - 1));
        con.setConnectionDelegate(delegate);

        _handlers.put(con.getConnectionId(),sender);

        _receiver = new InputHandler(new Assembler(con), InputHandler.State.FRAME_HDR);

        Thread t = new Thread(this);
        t.start();
View Full Code Here

            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
            System.getProperty("test.port.ssl") +
            "?ssl='true'&ssl_cert_alias='app1''";
           
            AMQTestConnection_0_10 con = new AMQTestConnection_0_10(url);     
            Connection transportCon = con.getConnection();
            String userID = transportCon.getSecurityLayer().getUserID();
            assertEquals("The correct certificate was not choosen","app1@acme.org",userID);
            con.close();
           
            url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
            System.getProperty("test.port.ssl") +
            "?ssl='true'&ssl_cert_alias='app2''";
           
            con = new AMQTestConnection_0_10(url);     
            transportCon = con.getConnection();
            userID = transportCon.getSecurityLayer().getUserID();
            assertEquals("The correct certificate was not choosen","app2@acme.org",userID);
            con.close();
        }       
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.Connection

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.