com.microsoft.azure.eventhubs.ManagementChannel Maven / Gradle / Ivy
/*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
package com.microsoft.azure.eventhubs;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import com.microsoft.azure.eventhubs.amqp.AmqpResponseCode;
import com.microsoft.azure.eventhubs.amqp.IAmqpConnection;
import com.microsoft.azure.eventhubs.amqp.IOperationResult;
import com.microsoft.azure.eventhubs.amqp.ISessionProvider;
import com.microsoft.azure.eventhubs.amqp.ReactorDispatcher;
import com.microsoft.azure.eventhubs.amqp.RequestResponseChannel;
import com.microsoft.azure.eventhubs.amqp.RequestResponseCloser;
import com.microsoft.azure.eventhubs.amqp.RequestResponseOpener;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.amqp.messaging.AmqpValue;
import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
import org.apache.qpid.proton.message.Message;
public class ManagementChannel {
final FaultTolerantObject innerChannel;
final ISessionProvider sessionProvider;
final IAmqpConnection connectionEventDispatcher;
public ManagementChannel(final ISessionProvider sessionProvider, final IAmqpConnection connection,
final String linkName) {
this.sessionProvider = sessionProvider;
this.connectionEventDispatcher = connection;
RequestResponseCloser closer = new RequestResponseCloser();
this.innerChannel = new FaultTolerantObject<>(
new RequestResponseOpener(sessionProvider, "mgmt-session", "mgmt", ClientConstants.MANAGEMENT_ADDRESS, connection),
closer);
closer.setInnerChannel(this.innerChannel);
}
public CompletableFuture
© 2015 - 2025 Weber Informatics LLC | Privacy Policy