Package com.microsoft.azure.servicebus
Class ClientFactory
- java.lang.Object
-
- com.microsoft.azure.servicebus.ClientFactory
-
public final class ClientFactory extends Object
Utility class for creating message senders and receivers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IMessageSessionacceptSessionFromConnectionString(String amqpConnectionString, String sessionId)Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode from service bus connection string with specified session id.static IMessageSessionacceptSessionFromConnectionString(String amqpConnectionString, String sessionId, ReceiveMode receiveMode)Accept aIMessageSessionfrom service bus connection string with specified session id.static CompletableFuture<IMessageSession>acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId)Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode asynchronously from service bus connection string with specified session id.static CompletableFuture<IMessageSession>acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId, ReceiveMode receiveMode)Accept aIMessageSessionasynchronously from service bus connection string with specified session id.static IMessageSessionacceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId)Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode from service bus connection string builder with specified session id.static IMessageSessionacceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId, ReceiveMode receiveMode)Accept aIMessageSessionfrom service bus connection string builder with specified session id.static CompletableFuture<IMessageSession>acceptSessionFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId)Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode asynchronously from service bus connection string builder with specified session id.static CompletableFuture<IMessageSession>acceptSessionFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId, ReceiveMode receiveMode)Accept aIMessageSessionasynchronously from service bus connection string builder with specified session id.static IMessageSessionacceptSessionFromEntityPath(MessagingFactory messagingFactory, String entityPath, String sessionId)Accept aIMessageSessionfrom service bus using the client settings with specified session id.static IMessageSessionacceptSessionFromEntityPath(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode)Accept aIMessageSessionfrom service bus using the client settings with specified session id.static IMessageSessionacceptSessionFromEntityPath(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings)Accept aIMessageSessionfrom service bus using the client settings with specified session id in PeekLock mode.static IMessageSessionacceptSessionFromEntityPath(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)Accept aIMessageSessionfrom service bus using the client settings with specified session id.static IMessageSessionacceptSessionFromEntityPath(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings)Accept aIMessageSessionfrom service bus using the client settings with specified session id in PeekLock mode.static IMessageSessionacceptSessionFromEntityPath(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)Accept aIMessageSessionfrom service bus using the client settings with specified session id.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId)Asynchronously accepts a session from service bus using the client settings.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode)Asynchronously accepts a session from service bus using the client settings.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings)Asynchronously accepts a session in PeekLock mode from service bus using the client settings.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)Asynchronously accepts a session from service bus using the client settings.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings)Asynchronously accepts a session in PeekLock mode from service bus using the client settings.static CompletableFuture<IMessageSession>acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)Asynchronously accepts a session from service bus using the client settings.static IMessageReceivercreateMessageReceiverFromConnectionString(String amqpConnectionString)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from service bus connection string with Shared Access Signaturesstatic IMessageReceivercreateMessageReceiverFromConnectionString(String amqpConnectionString, ReceiveMode receiveMode)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from service bus connection string with Shared Access Signaturesstatic CompletableFuture<IMessageReceiver>createMessageReceiverFromConnectionStringAsync(String amqpConnectionString)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from connection string with Shared Access Signaturesstatic CompletableFuture<IMessageReceiver>createMessageReceiverFromConnectionStringAsync(String amqpConnectionString, ReceiveMode receiveMode)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from connection string with Shared Access Signaturesstatic IMessageReceivercreateMessageReceiverFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from ConnectionStringBuilderstatic IMessageReceivercreateMessageReceiverFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode)CreateIMessageReceiverfrom ConnectionStringBuilderstatic CompletableFuture<IMessageReceiver>createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder)CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from ConnectionStringBuilderstatic CompletableFuture<IMessageReceiver>createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode)CreateIMessageReceiverasynchronously from ConnectionStringBuilderstatic IMessageReceivercreateMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath)Creates a message receiver to the entity.static IMessageReceivercreateMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode)Creates a message receiver to the entity.static IMessageReceivercreateMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings)Creates a message receiver to the entity using the client settings in PeekLock modestatic IMessageReceivercreateMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)Creates a message receiver to the entity using the client settings.static IMessageReceivercreateMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)Creates a message receiver to the entity using the client settings in PeekLock modestatic IMessageReceivercreateMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)Creates a message receiver to the entity using the client settings.static CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath)Asynchronously creates a new message receiver to the entity on the messagingFactory.static CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode)Asynchronously creates a new message receiver to the entity on the messagingFactory.static CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings)Asynchronously creates a message receiver to the entity using the client settings in PeekLock modestatic CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)Asynchronously creates a message receiver to the entity using the client settingsstatic CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)Asynchronously creates a message receiver to the entity using the client settings in PeekLock modestatic CompletableFuture<IMessageReceiver>createMessageReceiverFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)Asynchronously creates a message receiver to the entity using the client settingsstatic IMessageSendercreateMessageSenderFromConnectionString(String amqpConnectionString)Create message sender from service bus connection string with Shared Access Signaturesstatic CompletableFuture<IMessageSender>createMessageSenderFromConnectionStringAsync(String amqpConnectionString)Create message sender asynchronously from connection string with Shared Access Signaturesstatic IMessageSendercreateMessageSenderFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder)Create message sender from ConnectionStringBuilderstatic CompletableFuture<IMessageSender>createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder)Create message sender asynchronously from ConnectionStringBuilderstatic IMessageSendercreateMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath)Creates a message sender to the entity.static IMessageSendercreateMessageSenderFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings)Creates a message sender to the entity using the client settings.static IMessageSendercreateMessageSenderFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)Creates a message sender to the entity using the client settings.static CompletableFuture<IMessageSender>createMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath)Creates a message sender asynchronously to the entity using theMessagingFactorystatic CompletableFuture<IMessageSender>createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings)Creates a message sender asynchronously to the entity using the client settings.static CompletableFuture<IMessageSender>createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)Creates a message sender asynchronously to the entity using the client settings.static IMessageSendercreateTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)Creates a transfer message sender.static CompletableFuture<IMessageSender>createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)Creates a transfer message sender asynchronously.
-
-
-
Method Detail
-
createMessageSenderFromConnectionString
public static IMessageSender createMessageSenderFromConnectionString(String amqpConnectionString) throws InterruptedException, ServiceBusException
Create message sender from service bus connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection string- Returns:
IMessageSenderinstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createMessageSenderFromConnectionStringBuilder
public static IMessageSender createMessageSenderFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder) throws InterruptedException, ServiceBusException
Create message sender from ConnectionStringBuilderIMessageSender messageSender = ClientFactory.createMessageSenderFromConnectionStringBuilder(new ConnectionStringBuilder(connectionString, queueName));- Parameters:
amqpConnectionStringBuilder- the connection string builder- Returns:
IMessageSenderinstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createMessageSenderFromEntityPath
public static IMessageSender createMessageSenderFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Creates a message sender to the entity using the client settings.- Parameters:
namespaceName- namespace of entityentityPath- path of entityclientSettings- client settings- Returns:
- IMessageSender instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createMessageSenderFromEntityPath
public static IMessageSender createMessageSenderFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Creates a message sender to the entity using the client settings.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entityclientSettings- client settings- Returns:
- IMessageSender instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createMessageSenderFromEntityPath
public static IMessageSender createMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath) throws InterruptedException, ServiceBusException
Creates a message sender to the entity.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which sender needs to be createdentityPath- path of entity- Returns:
- IMessageSender instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createTransferMessageSenderFromEntityPath
public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException
Creates a transfer message sender. This sender sends message to destination entity via another entity. This is mainly to be used when sending messages in a transaction. When messages need to be sent across entities in a single transaction, this can be used to ensure all the messages land initially in the same entity/partition for local transactions, and then let service bus handle transferring the message to the actual destination.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which sender needs to be created.entityPath- path of the final destination of the message.viaEntityPath- The initial destination of the message.- Returns:
- IMessageSender instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the sender cannot be created
-
createMessageSenderFromConnectionStringAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringAsync(String amqpConnectionString)
Create message sender asynchronously from connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection string- Returns:
- a CompletableFuture representing the pending creating of
IMessageSenderinstance
-
createMessageSenderFromConnectionStringBuilderAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder)
Create message sender asynchronously from ConnectionStringBuilder- Parameters:
amqpConnectionStringBuilder- the connection string builder- Returns:
- a CompletableFuture representing the pending creating of
IMessageSenderinstance
-
createMessageSenderFromEntityPathAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings)
Creates a message sender asynchronously to the entity using the client settings.- Parameters:
namespaceName- namespace name of entityentityPath- path of entityclientSettings- client settings- Returns:
- a CompletableFuture representing the pending creating of IMessageSender instance
-
createMessageSenderFromEntityPathAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)
Creates a message sender asynchronously to the entity using the client settings.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entityclientSettings- client settings- Returns:
- a CompletableFuture representing the pending creating of IMessageSender instance
-
createMessageSenderFromEntityPathAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath)
Creates a message sender asynchronously to the entity using theMessagingFactory- Parameters:
messagingFactory- messaging factory (which represents a connection) on which sender needs to be createdentityPath- path of entity- Returns:
- a CompletableFuture representing the pending creating of IMessageSender instance
-
createTransferMessageSenderFromEntityPathAsync
public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)
Creates a transfer message sender asynchronously. This sender sends message to destination entity via another entity. This is mainly to be used when sending messages in a transaction. When messages need to be sent across entities in a single transaction, this can be used to ensure all the messages land initially in the same entity/partition for local transactions, and then let service bus handle transferring the message to the actual destination.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which sender needs to be created.entityPath- path of the final destination of the message.viaEntityPath- The initial destination of the message.- Returns:
- a CompletableFuture representing the pending creating of IMessageSender instance.
-
createMessageReceiverFromConnectionString
public static IMessageReceiver createMessageReceiverFromConnectionString(String amqpConnectionString) throws InterruptedException, ServiceBusException
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from service bus connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection string- Returns:
IMessageReceiverinstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromConnectionString
public static IMessageReceiver createMessageReceiverFromConnectionString(String amqpConnectionString, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from service bus connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection stringreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
IMessageReceiverinstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromConnectionStringBuilder
public static IMessageReceiver createMessageReceiverFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder) throws InterruptedException, ServiceBusException
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode from ConnectionStringBuilderIMessageReceiver messageReceiver = ClientFactory.createMessageReceiverFromConnectionStringBuilder(new ConnectionStringBuilder(connectionString, queueName));- Parameters:
amqpConnectionStringBuilder-ConnectionStringBuilder- Returns:
- The
IMessageReceiverinstance - Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromConnectionStringBuilder
public static IMessageReceiver createMessageReceiverFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
CreateIMessageReceiverfrom ConnectionStringBuilderIMessageReceiver messageReceiver = ClientFactory.createMessageReceiverFromConnectionStringBuilder(new ConnectionStringBuilder(connectionString, queueName), ReceiveMode.PEEKLOCK);- Parameters:
amqpConnectionStringBuilder-ConnectionStringBuilderreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
- The
IMessageReceiverinstance - Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity using the client settings in PeekLock mode- Parameters:
namespaceName- namespace of entityentityPath- path of the entityclientSettings- client settings- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity using the client settings.- Parameters:
namespaceName- namespace of entityentityPath- path of the entityclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity using the client settings in PeekLock mode- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of the entityclientSettings- client settings- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity using the client settings.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of the entityclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which receiver needs to be createdentityPath- path of the entity- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromEntityPath
public static IMessageReceiver createMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Creates a message receiver to the entity.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which receiver needs to be createdentityPath- path of the entityreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageReceiver instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the receiver cannot be created
-
createMessageReceiverFromConnectionStringAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringAsync(String amqpConnectionString)
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection string- Returns:
- a CompletableFuture representing the pending creating
-
createMessageReceiverFromConnectionStringAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringAsync(String amqpConnectionString, ReceiveMode receiveMode)
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from connection string with Shared Access Signatures- Parameters:
amqpConnectionString- the connection stringreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending creating
-
createMessageReceiverFromConnectionStringBuilderAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder)
CreateIMessageReceiverin defaultReceiveMode.PEEKLOCKmode asynchronously from ConnectionStringBuilder- Parameters:
amqpConnectionStringBuilder- the connection string builder- Returns:
- a CompletableFuture representing the pending creating
-
createMessageReceiverFromConnectionStringBuilderAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode)
CreateIMessageReceiverasynchronously from ConnectionStringBuilder- Parameters:
amqpConnectionStringBuilder- the connection string builderreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending creating
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings)
Asynchronously creates a message receiver to the entity using the client settings in PeekLock mode- Parameters:
namespaceName- namespace of entityentityPath- path of entityclientSettings- client settings- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Asynchronously creates a message receiver to the entity using the client settings- Parameters:
namespaceName- namespace of entityentityPath- path of entityclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)
Asynchronously creates a message receiver to the entity using the client settings in PeekLock mode- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entityclientSettings- client settings- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Asynchronously creates a message receiver to the entity using the client settings- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entityclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath)
Asynchronously creates a new message receiver to the entity on the messagingFactory.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which receiver needs to be created.entityPath- path of entity- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
createMessageReceiverFromEntityPathAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode)
Asynchronously creates a new message receiver to the entity on the messagingFactory.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which receiver needs to be created.entityPath- path of entityreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending creation of message receiver
-
acceptSessionFromConnectionString
public static IMessageSession acceptSessionFromConnectionString(String amqpConnectionString, String sessionId) throws InterruptedException, ServiceBusException
Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode from service bus connection string with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionString- connection stringsessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
IMessageSessioninstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromConnectionString
public static IMessageSession acceptSessionFromConnectionString(String amqpConnectionString, String sessionId, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus connection string with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionString- connection stringsessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
IMessageSessioninstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromConnectionStringBuilder
public static IMessageSession acceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId) throws InterruptedException, ServiceBusException
Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode from service bus connection string builder with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionStringBuilder- the connection string buildersessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
IMessageSessioninstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromConnectionStringBuilder
public static IMessageSession acceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus connection string builder with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionStringBuilder- the connection string buildersessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
IMessageSessioninstance- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id in PeekLock mode. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceName- namespace of entityentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settings- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceName- namespace of entityentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id in PeekLock mode. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settings- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(MessagingFactory messagingFactory, String entityPath, String sessionId) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which the session receiver needs to be created.entityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromEntityPath
public static IMessageSession acceptSessionFromEntityPath(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException
Accept aIMessageSessionfrom service bus using the client settings with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which the session receiver needs to be created.entityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- IMessageSession instance
- Throws:
InterruptedException- if the current thread was interrupted while waitingServiceBusException- if the session cannot be accepted
-
acceptSessionFromConnectionStringAsync
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId)
Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode asynchronously from service bus connection string with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionString- the connection stringsessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromConnectionStringAsync
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId, ReceiveMode receiveMode)
Accept aIMessageSessionasynchronously from service bus connection string with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionString- the connection stringsessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromConnectionStringBuilderAsync
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId)
Accept aIMessageSessionin defaultReceiveMode.PEEKLOCKmode asynchronously from service bus connection string builder with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionStringBuilder- the connection string buildersessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromConnectionStringBuilderAsync
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId, ReceiveMode receiveMode)
Accept aIMessageSessionasynchronously from service bus connection string builder with specified session id. Session Id can be null, if null, service will return the first available session.- Parameters:
amqpConnectionStringBuilder- connection string buildersessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode-ReceiveModePeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings)
Asynchronously accepts a session in PeekLock mode from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceName- namespace of entityentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settings- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceName- namespace of entityentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings)
Asynchronously accepts a session in PeekLock mode from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settings- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode)
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
namespaceEndpointURI- endpoint uri of entity namespaceentityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionclientSettings- client settingsreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId)
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which the session receiver needs to be created.entityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified session- Returns:
- a CompletableFuture representing the pending session accepting
-
acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode)
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.- Parameters:
messagingFactory- messaging factory (which represents a connection) on which the session receiver needs to be created.entityPath- path of entitysessionId- session id, if null, service will return the first available session, otherwise, service will return specified sessionreceiveMode- PeekLock or ReceiveAndDelete- Returns:
- a CompletableFuture representing the pending session accepting
-
-