Search in sources :

Example 1 with ActiveMQProtonRemotingConnection

use of org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection in project activemq-artemis by apache.

the class ProtonClientConnectionManager method connectionCreated.

@Override
public void connectionCreated(ActiveMQComponent component, Connection connection, ProtonProtocolManager protocolManager) {
    ActiveMQProtonRemotingConnection amqpConnection = connectionFactory.createConnection(protocolManager, connection, eventHandler, clientSASLFactory);
    connectionMap.put(connection.getID(), amqpConnection);
    amqpConnection.open();
    log.info("Connection " + amqpConnection.getRemoteAddress() + " created");
}
Also used : ActiveMQProtonRemotingConnection(org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection)

Example 2 with ActiveMQProtonRemotingConnection

use of org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection in project activemq-artemis by apache.

the class AMQPClientConnectionFactory method createConnection.

public ActiveMQProtonRemotingConnection createConnection(ProtonProtocolManager protocolManager, Connection connection, Optional<EventHandler> eventHandler, ClientSASLFactory clientSASLFactory) {
    AMQPConnectionCallback connectionCallback = new AMQPConnectionCallback(protocolManager, connection, server.getExecutorFactory().getExecutor(), server);
    Executor executor = server.getExecutorFactory().getExecutor();
    AMQPConnectionContext amqpConnection = new AMQPConnectionContext(protocolManager, connectionCallback, containerId, ttl, protocolManager.getMaxFrameSize(), AMQPConstants.Connection.DEFAULT_CHANNEL_MAX, useCoreSubscriptionNaming, server.getScheduledPool(), false, clientSASLFactory, connectionProperties);
    eventHandler.ifPresent(amqpConnection::addEventHandler);
    ActiveMQProtonRemotingConnection delegate = new ActiveMQProtonRemotingConnection(protocolManager, amqpConnection, connection, executor);
    delegate.addFailureListener(connectionCallback);
    delegate.addCloseListener(connectionCallback);
    connectionCallback.setProtonConnectionDelegate(delegate);
    return delegate;
}
Also used : Executor(java.util.concurrent.Executor) AMQPConnectionContext(org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext) AMQPConnectionCallback(org.apache.activemq.artemis.protocol.amqp.broker.AMQPConnectionCallback) ActiveMQProtonRemotingConnection(org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection)

Aggregations

ActiveMQProtonRemotingConnection (org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection)2 Executor (java.util.concurrent.Executor)1 AMQPConnectionCallback (org.apache.activemq.artemis.protocol.amqp.broker.AMQPConnectionCallback)1 AMQPConnectionContext (org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext)1