Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.Connector


            super.tearDown();
    }


    public void testSecureConnector() {
        Connector connector = new TransportConnector(sslTransportServer);
        connectionContext.setConnector(connector);
        connectionInfo.setTransportContext(new StubX509Certificate[] {});

        try {
            authBroker.addConnection(connectionContext, connectionInfo);
View Full Code Here


        assertEquals("Number of removeConnection calls to underlying Broker must match number of calls made to " +
                "AuthenticationBroker.", 1, receiveBroker.removeConnectionData.size());
    }

    public void testInsecureConnector() {
        Connector connector = new TransportConnector(nonSslTransportServer);
        connectionContext.setConnector(connector);
        connectionInfo.setUserName(INSECURE_USERNAME);

        try {
            authBroker.addConnection(connectionContext, connectionInfo);
View Full Code Here

     *                connection.
     */
    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
        if (context.getSecurityContext() == null) {
            boolean isSSL;
            Connector connector = context.getConnector();
            if (connector instanceof TransportConnector) {
                TransportConnector transportConnector = (TransportConnector) connector;
                isSSL = transportConnector.getServer().isSslServer();
            } else {
                isSSL = false;
View Full Code Here

    /**
     * Overriding removeConnection to make sure the security context is cleaned.
     */
    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
        boolean isSSL;
        Connector connector = context.getConnector();
        if (connector instanceof TransportConnector) {
            TransportConnector transportConnector = (TransportConnector) connector;
            isSSL = (transportConnector.getServer() instanceof SslTransportServer);
        } else {
            isSSL = false;
View Full Code Here

            super.tearDown();
    }


    public void testSecureConnector() {
        Connector connector = new TransportConnector(sslTransportServer);
        connectionContext.setConnector(connector);
        connectionInfo.setTransportContext(new StubX509Certificate[] {});

        try {
            authBroker.addConnection(connectionContext, connectionInfo);
View Full Code Here

        assertEquals("Number of removeConnection calls to underlying Broker must match number of calls made to " +
                "AuthenticationBroker.", 1, receiveBroker.removeConnectionData.size());
    }

    public void testInsecureConnector() {
        Connector connector = new TransportConnector(nonSslTransportServer);
        connectionContext.setConnector(connector);
        connectionInfo.setUserName(INSECURE_USERNAME);
       
        try {
            authBroker.addConnection(connectionContext, connectionInfo);
View Full Code Here

     */
    @Override
    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
        if (context.getSecurityContext() == null) {
            boolean isSSL;
            Connector connector = context.getConnector();
            if (connector instanceof TransportConnector) {
                TransportConnector transportConnector = (TransportConnector) connector;
                isSSL = transportConnector.getServer().isSslServer();
            } else {
                isSSL = false;
View Full Code Here

     * Overriding removeConnection to make sure the security context is cleaned.
     */
    @Override
    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
        boolean isSSL;
        Connector connector = context.getConnector();
        if (connector instanceof TransportConnector) {
            TransportConnector transportConnector = (TransportConnector) connector;
            isSSL = (transportConnector.getServer() instanceof SslTransportServer);
        } else {
            isSSL = false;
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.Connector

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.