Search in sources :

Example 36 with ConnectionInfo

use of org.apache.activemq.command.ConnectionInfo in project activemq-artemis by apache.

the class ConnectionInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    ConnectionInfo info = new ConnectionInfo();
    populateObject(info);
    return info;
}
Also used : ConnectionInfo(org.apache.activemq.command.ConnectionInfo)

Example 37 with ConnectionInfo

use of org.apache.activemq.command.ConnectionInfo in project activemq-artemis by apache.

the class JaasDualAuthenticationBrokerTest method setUp.

@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();
}
Also used : StubSSLServerSocket(org.apache.activemq.transport.tcp.StubSSLServerSocket) ConnectionContext(org.apache.activemq.broker.ConnectionContext) SslTransportServer(org.apache.activemq.transport.tcp.SslTransportServer) ConnectionInfo(org.apache.activemq.command.ConnectionInfo) StubSSLServerSocket(org.apache.activemq.transport.tcp.StubSSLServerSocket) SSLServerSocket(javax.net.ssl.SSLServerSocket) TcpTransportServer(org.apache.activemq.transport.tcp.TcpTransportServer) URI(java.net.URI) StubSSLSocketFactory(org.apache.activemq.transport.tcp.StubSSLSocketFactory) StubBroker(org.apache.activemq.broker.StubBroker)

Example 38 with ConnectionInfo

use of org.apache.activemq.command.ConnectionInfo in project activemq-artemis by apache.

the class JaasCertificateAuthenticationBrokerTest method setUp.

@Override
protected void setUp() throws Exception {
    receiveBroker = new StubBroker();
    authBroker = new JaasCertificateAuthenticationBroker(receiveBroker, "");
    connectionContext = new ConnectionContext();
    connectionInfo = new ConnectionInfo();
    connectionInfo.setTransportContext(new StubX509Certificate[] {});
}
Also used : ConnectionContext(org.apache.activemq.broker.ConnectionContext) ConnectionInfo(org.apache.activemq.command.ConnectionInfo) StubBroker(org.apache.activemq.broker.StubBroker)

Example 39 with ConnectionInfo

use of org.apache.activemq.command.ConnectionInfo in project activemq-artemis by apache.

the class ConnectionInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    ConnectionInfo info = new ConnectionInfo();
    populateObject(info);
    return info;
}
Also used : ConnectionInfo(org.apache.activemq.command.ConnectionInfo)

Example 40 with ConnectionInfo

use of org.apache.activemq.command.ConnectionInfo in project activemq-artemis by apache.

the class ConnectionInfoTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ConnectionInfo info = (ConnectionInfo) object;
    info.setConnectionId(createConnectionId("ConnectionId:1"));
    info.setClientId("ClientId:2");
    info.setPassword("Password:3");
    info.setUserName("UserName:4");
    {
        BrokerId[] value = new BrokerId[2];
        for (int i = 0; i < 2; i++) {
            value[i] = createBrokerId("BrokerPath:5");
        }
        info.setBrokerPath(value);
    }
    info.setBrokerMasterConnector(true);
    info.setManageable(false);
    info.setClientMaster(true);
}
Also used : ConnectionInfo(org.apache.activemq.command.ConnectionInfo)

Aggregations

ConnectionInfo (org.apache.activemq.command.ConnectionInfo)110 SessionInfo (org.apache.activemq.command.SessionInfo)77 ConsumerInfo (org.apache.activemq.command.ConsumerInfo)76 ProducerInfo (org.apache.activemq.command.ProducerInfo)72 Message (org.apache.activemq.command.Message)71 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)44 StubConnection (org.apache.activemq.broker.StubConnection)18 ActiveMQQueue (org.apache.activemq.command.ActiveMQQueue)18 MessageAck (org.apache.activemq.command.MessageAck)15 XATransactionId (org.apache.activemq.command.XATransactionId)15 ActiveMQTopic (org.apache.activemq.command.ActiveMQTopic)12 DataArrayResponse (org.apache.activemq.command.DataArrayResponse)10 TransactionInfo (org.apache.activemq.command.TransactionInfo)9 LocalTransactionId (org.apache.activemq.command.LocalTransactionId)8 ConnectionId (org.apache.activemq.command.ConnectionId)6 RemoveInfo (org.apache.activemq.command.RemoveInfo)6 IOException (java.io.IOException)5 Response (org.apache.activemq.command.Response)5 Test (org.junit.Test)5 ConnectionContext (org.apache.activemq.broker.ConnectionContext)4