Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ static IMessageSender createMessageSenderFromEntityPath(MessagingFactory messagi
* @throws InterruptedException if the current thread was interrupted while waiting
* @throws ServiceBusException if the sender cannot be created
*/
public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException
{
public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createTransferMessageSenderFromEntityPathAsync(messagingFactory, entityPath, viaEntityPath));
}

Expand Down Expand Up @@ -152,8 +151,7 @@ static CompletableFuture<IMessageSender> createMessageSenderFromConnectionString
* @param clientSettings client settings
* @return a CompletableFuture representing the pending creating of IMessageSender instance
*/
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings)
{
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings) {
Utils.assertNonNull("namespaceName", namespaceName);
Utils.assertNonNull("entityPath", entityPath);
return createMessageSenderFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName), entityPath, clientSettings);
Expand All @@ -166,13 +164,11 @@ public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPat
* @param clientSettings client settings
* @return a CompletableFuture representing the pending creating of IMessageSender instance
*/
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings)
{
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) {
return createMessageSenderFromEntityPathAsync(namespaceEndpointURI, entityPath, null, clientSettings);
}

static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, MessagingEntityType entityType, ClientSettings clientSettings)
{
static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, MessagingEntityType entityType, ClientSettings clientSettings) {
Utils.assertNonNull("namespaceEndpointURI", namespaceEndpointURI);
MessageSender sender = new MessageSender(namespaceEndpointURI, entityPath, null, entityType, clientSettings);
return sender.initializeAsync().thenApply((v) -> sender);
Expand Down Expand Up @@ -206,8 +202,7 @@ static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(
* @param viaEntityPath The initial destination of the message.
* @return a CompletableFuture representing the pending creating of IMessageSender instance.
*/
public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)
{
public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) {
Utils.assertNonNull("messagingFactory", messagingFactory);
MessageSender sender = new MessageSender(messagingFactory, viaEntityPath, entityPath, null);
return sender.initializeAsync().thenApply((v) -> sender);
Expand Down Expand Up @@ -417,7 +412,7 @@ public static CompletableFuture<IMessageReceiver> createMessageReceiverFromEntit
*/
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);
return createMessageReceiverFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName), entityPath, clientSettings, receiveMode);
}

/**
Expand Down Expand Up @@ -683,7 +678,7 @@ public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsyn
*/
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(String namespaceName, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) {
Utils.assertNonNull("namespaceName", namespaceName);
return acceptSessionFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName),entityPath, sessionId, clientSettings, receiveMode);
return acceptSessionFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName), entityPath, sessionId, clientSettings, receiveMode);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class ClientSettings {
*
* @see RetryPolicy#getDefault()
*/
public ClientSettings(TokenProvider tokenProvider)
{
public ClientSettings(TokenProvider tokenProvider) {
this(tokenProvider, RetryPolicy.getDefault(), Duration.ofSeconds(ClientConstants.DEFAULT_OPERATION_TIMEOUT_IN_SECONDS), TransportType.AMQP);
}

Expand All @@ -39,8 +38,7 @@ public ClientSettings(TokenProvider tokenProvider)
* @param retryPolicy {@link RetryPolicy} instance
* @param operationTimeout default operation timeout to be used for all client operations. Client can override this value by explicitly specifying a timeout in the operation.
*/
public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout)
{
public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout) {
this(tokenProvider, retryPolicy, operationTimeout, TransportType.AMQP);
}

Expand All @@ -51,8 +49,7 @@ public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Dura
* @param operationTimeout default operation timeout to be used for all client operations. Client can override this value by explicitly specifying a timeout in the operation.
* @param transportType {@link TransportType} instance
*/
public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout, TransportType transportType)
{
public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Duration operationTimeout, TransportType transportType) {
this.tokenProvider = tokenProvider;
this.retryPolicy = retryPolicy;
this.operationTimeout = operationTimeout;
Expand All @@ -63,32 +60,31 @@ public ClientSettings(TokenProvider tokenProvider, RetryPolicy retryPolicy, Dura
* Gets the token provider contained in this instance.
* @return TokenProvider contained in this instance
*/
public TokenProvider getTokenProvider()
{
public TokenProvider getTokenProvider() {
return tokenProvider;
}

/**
* Gets the retry policy contained in this instance.
* @return RetryPolicy contained in this instance
*/
public RetryPolicy getRetryPolicy()
{
public RetryPolicy getRetryPolicy() {
return retryPolicy;
}

/**
* Gets the operation timeout contained in this instance.
* @return operation timeout contained in this instance
*/
public Duration getOperationTimeout()
{
public Duration getOperationTimeout() {
return operationTimeout;
}

/**
* Gets the transport type for this instance
* @return transport type for the instance
*/
public TransportType getTransportType() { return transportType; }
public TransportType getTransportType() {
return transportType;
}
}
Loading