/** * Asynchronously creates a message receiver to the entity using the client settings in PeekLock mode * @param namespaceName namespace of entity * @param entityPath path of entity * @param clientSettings client settings * @return a CompletableFuture representing the pending creation of message receiver */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings) { return createMessageReceiverFromEntityPathAsync(namespaceName, entityPath, clientSettings, DEFAULTRECEIVEMODE); }
/** * Asynchronously creates a new message receiver to the entity on the messagingFactory. * @param messagingFactory messaging factory (which represents a connection) on which receiver needs to be created. * @param entityPath path of entity * @param receiveMode PeekLock or ReceiveAndDelete * @return a CompletableFuture representing the pending creation of message receiver */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode) { return createMessageReceiverFromEntityPathAsync(messagingFactory, entityPath, null, receiveMode); }
/** * Asynchronously creates a message receiver to the entity using the client settings in PeekLock mode * @param namespaceEndpointURI endpoint uri of entity namespace * @param entityPath path of entity * @param clientSettings client settings * @return a CompletableFuture representing the pending creation of message receiver */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) { return createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings, DEFAULTRECEIVEMODE); }
/** * Asynchronously creates a new message receiver to the entity on the messagingFactory. * @param messagingFactory messaging factory (which represents a connection) on which receiver needs to be created. * @param entityPath path of entity * @return a CompletableFuture representing the pending creation of message receiver */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath) { return createMessageReceiverFromEntityPathAsync(messagingFactory, entityPath, DEFAULTRECEIVEMODE); }
/** * Creates a message receiver to the entity using the client settings in PeekLock mode * @param namespaceEndpointURI endpoint uri of entity namespace * @param entityPath path of the entity * @param clientSettings client settings * @return IMessageReceiver instance * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if the receiver cannot be created */ public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings)); }
/** * Creates a message receiver to the entity. * @param messagingFactory messaging factory (which represents a connection) on which receiver needs to be created * @param entityPath path of the entity * @param receiveMode PeekLock or ReceiveAndDelete * @return IMessageReceiver instance * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if the receiver cannot be created */ public static IMessageReceiver createMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(messagingFactory, entityPath, receiveMode)); }
static IMessageReceiver createMessageReceiverFromEntityPath(MessagingFactory messagingFactory, String entityPath, MessagingEntityType entityType, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(messagingFactory, entityPath, entityType, receiveMode)); }
/** * Creates a message receiver to the entity using the client settings in PeekLock mode * @param namespaceName namespace of entity * @param entityPath path of the entity * @param clientSettings client settings * @return IMessageReceiver instance * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if the receiver cannot be created */ public static IMessageReceiver createMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceName, entityPath, clientSettings)); }
/** * Creates a message receiver to the entity using the client settings. * @param namespaceName namespace of entity * @param entityPath path of the entity * @param clientSettings client settings * @param receiveMode PeekLock or ReceiveAndDelete * @return IMessageReceiver instance * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if the receiver cannot be created */ public static IMessageReceiver createMessageReceiverFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceName, entityPath, clientSettings, receiveMode)); }
/** * Creates a message receiver to the entity using the client settings. * @param namespaceEndpointURI endpoint uri of entity namespace * @param entityPath path of the entity * @param clientSettings client settings * @param receiveMode PeekLock or ReceiveAndDelete * @return IMessageReceiver instance * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if the receiver cannot be created */ public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings, receiveMode)); }
/** * Asynchronously creates a message receiver to the entity using the client settings * @param namespaceName namespace of entity * @param entityPath path of entity * @param clientSettings client settings * @param receiveMode PeekLock or ReceiveAndDelete * @return a CompletableFuture representing the pending creation of message receiver */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings, ReceiveMode receiveMode) { Utils.assertNonNull("namespaceName", namespaceName); return createMessageReceiverFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName),entityPath, clientSettings, receiveMode); }
/** * Create {@link IMessageReceiver} asynchronously from ConnectionStringBuilder * * @param amqpConnectionStringBuilder the connection string builder * @param receiveMode {@link ReceiveMode} PeekLock or ReceiveAndDelete * @return a CompletableFuture representing the pending creating */ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode) { Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder); return createMessageReceiverFromEntityPathAsync(amqpConnectionStringBuilder.getEndpoint(), amqpConnectionStringBuilder.getEntityPath(), Util.getClientSettingsFromConnectionStringBuilder(amqpConnectionStringBuilder), receiveMode); }