org.apache.activemq.broker.StubBroker

Here are the examples of the java api class org.apache.activemq.broker.StubBroker taken from open source projects.

1. JaasCertificateAuthenticationBrokerTest#setUp()

View license
@Override
protected void setUp() throws Exception {
    receiveBroker = new StubBroker();
    authBroker = new JaasCertificateAuthenticationBroker(receiveBroker, "");
    connectionContext = new ConnectionContext();
    connectionInfo = new ConnectionInfo();
    connectionInfo.setTransportContext(new StubX509Certificate[] {});
}

2. JaasDualAuthenticationBrokerTest#setUp()

View license
@Override
protected void setUp() throws Exception {
    receiveBroker = new StubBroker();
    authBroker = new JaasDualAuthenticationBroker(receiveBroker, "activemq-domain", "activemq-ssl-domain");
    connectionContext = new ConnectionContext();
    SSLServerSocket sslServerSocket = new StubSSLServerSocket();
    StubSSLSocketFactory socketFactory = new StubSSLSocketFactory(sslServerSocket);
    try {
        sslTransportServer = new SslTransportServer(null, new URI("ssl://localhost:61616?needClientAuth=true"), socketFactory);
    } catch (Exception e) {
        fail("Unable to create SslTransportServer.");
    }
    sslTransportServer.setNeedClientAuth(true);
    sslTransportServer.bind();
    try {
        nonSslTransportServer = new TcpTransportServer(null, new URI("tcp://localhost:61613"), socketFactory);
    } catch (Exception e) {
        fail("Unable to create TcpTransportServer.");
    }
    connectionInfo = new ConnectionInfo();
    createLoginConfig();
}