diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java index 7cd3bc458a42..a7f206ccff6b 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java @@ -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)); } @@ -152,8 +151,7 @@ static CompletableFuture createMessageSenderFromConnectionString * @param clientSettings client settings * @return a CompletableFuture representing the pending creating of IMessageSender instance */ - public static CompletableFuture createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings) - { + public static CompletableFuture createMessageSenderFromEntityPathAsync(String namespaceName, String entityPath, ClientSettings clientSettings) { Utils.assertNonNull("namespaceName", namespaceName); Utils.assertNonNull("entityPath", entityPath); return createMessageSenderFromEntityPathAsync(Util.convertNamespaceToEndPointURI(namespaceName), entityPath, clientSettings); @@ -166,13 +164,11 @@ public static CompletableFuture createMessageSenderFromEntityPat * @param clientSettings client settings * @return a CompletableFuture representing the pending creating of IMessageSender instance */ - public static CompletableFuture createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) - { + public static CompletableFuture createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) { return createMessageSenderFromEntityPathAsync(namespaceEndpointURI, entityPath, null, clientSettings); } - static CompletableFuture createMessageSenderFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, MessagingEntityType entityType, ClientSettings clientSettings) - { + static CompletableFuture 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); @@ -206,8 +202,7 @@ static CompletableFuture createMessageSenderFromEntityPathAsync( * @param viaEntityPath The initial destination of the message. * @return a CompletableFuture representing the pending creating of IMessageSender instance. */ - public static CompletableFuture createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) - { + public static CompletableFuture 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); @@ -417,7 +412,7 @@ public static CompletableFuture createMessageReceiverFromEntit */ public static CompletableFuture 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); } /** @@ -683,7 +678,7 @@ public static CompletableFuture acceptSessionFromEntityPathAsyn */ public static CompletableFuture 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); } /** diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientSettings.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientSettings.java index 768fb32422c3..3ef5beff2eba 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientSettings.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientSettings.java @@ -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); } @@ -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); } @@ -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; @@ -63,8 +60,7 @@ 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; } @@ -72,8 +68,7 @@ public TokenProvider getTokenProvider() * Gets the retry policy contained in this instance. * @return RetryPolicy contained in this instance */ - public RetryPolicy getRetryPolicy() - { + public RetryPolicy getRetryPolicy() { return retryPolicy; } @@ -81,8 +76,7 @@ public RetryPolicy getRetryPolicy() * Gets the operation timeout contained in this instance. * @return operation timeout contained in this instance */ - public Duration getOperationTimeout() - { + public Duration getOperationTimeout() { return operationTimeout; } @@ -90,5 +84,7 @@ public Duration getOperationTimeout() * Gets the transport type for this instance * @return transport type for the instance */ - public TransportType getTransportType() { return transportType; } + public TransportType getTransportType() { + return transportType; + } } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessage.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessage.java index 77a6427c0c36..a99483cd0d5b 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessage.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessage.java @@ -25,7 +25,7 @@ public interface IMessage { * @return delivery count of this message. * @see Message transfers, locks, and settlement. */ - public long getDeliveryCount(); + long getDeliveryCount(); /** * Gets the Id of this message. @@ -39,14 +39,14 @@ public interface IMessage { * * @return Id of this message */ - public String getMessageId(); + String getMessageId(); /** * Sets the Id of this message. * @param messageId Id of this message * @see #getMessageId() */ - public void setMessageId(String messageId); + void setMessageId(String messageId); /** * Gets the duration before this message expires. @@ -61,7 +61,7 @@ public interface IMessage { * @return Time to Live duration of this message * @see Message Expiration */ - public Duration getTimeToLive(); + Duration getTimeToLive(); /** * Sets the duration of time before this message expires. @@ -69,7 +69,7 @@ public interface IMessage { * @param timeToLive Time to Live duration of this message * @see #getTimeToLive() */ - public void setTimeToLive(Duration timeToLive); + void setTimeToLive(Duration timeToLive); /** * Gets the content type of this message. @@ -79,7 +79,7 @@ public interface IMessage { * * @return content type of this message */ - public String getContentType(); + String getContentType(); /** * Sets the content type of this message. @@ -87,7 +87,7 @@ public interface IMessage { * @param contentType content type of this message * @see #getContentType() */ - public void setContentType(String contentType); + void setContentType(String contentType); /** * Gets the instant at which this message will expire. @@ -100,7 +100,7 @@ public interface IMessage { * @return instant at which this message expires * @see Message Expiration */ - public Instant getExpiresAtUtc(); + Instant getExpiresAtUtc(); /** * Gets the instant at which the lock of this message expires. @@ -112,7 +112,7 @@ public interface IMessage { * @return the instant at which the lock of this message expires if the message is received using PEEKLOCK mode. Otherwise it returns null. * @see Message transfers, locks, and settlement */ - public Instant getLockedUntilUtc(); + Instant getLockedUntilUtc(); /** * Gets the instant at which this message was enqueued in Azure Service Bus. @@ -125,7 +125,7 @@ public interface IMessage { * @return the instant at which the message was enqueued in Azure Service Bus * @see Message Sequencing and Timestamps */ - public Instant getEnqueuedTimeUtc(); + Instant getEnqueuedTimeUtc(); /** * Gets the scheduled enqueue time of this message. @@ -140,7 +140,7 @@ public interface IMessage { * @deprecated Replaced by {@link #getScheduledEnqueueTimeUtc()} */ @Deprecated - public Instant getScheduledEnqueuedTimeUtc(); + Instant getScheduledEnqueuedTimeUtc(); /** * Sets the scheduled enqueue time of this message. @@ -150,7 +150,7 @@ public interface IMessage { * @deprecated Replaced by {@link #setScheduledEnqueueTimeUtc(Instant)} */ @Deprecated - public void setScheduledEnqueuedTimeUtc(Instant scheduledEnqueueTimeUtc); + void setScheduledEnqueuedTimeUtc(Instant scheduledEnqueueTimeUtc); /** * Gets the scheduled enqueue time of this message. @@ -163,7 +163,7 @@ public interface IMessage { * @return the instant at which the message will be enqueued in Azure Service Bus * @see Message Sequencing and Timestamps */ - public Instant getScheduledEnqueueTimeUtc(); + Instant getScheduledEnqueueTimeUtc(); /** * Sets the scheduled enqueue time of this message. @@ -171,7 +171,7 @@ public interface IMessage { * @param scheduledEnqueueTimeUtc the instant at which this message should be enqueued in Azure Service Bus * @see #getScheduledEnqueueTimeUtc() */ - public void setScheduledEnqueueTimeUtc(Instant scheduledEnqueueTimeUtc); + void setScheduledEnqueueTimeUtc(Instant scheduledEnqueueTimeUtc); /** * Gets the unique number assigned to a message by Service Bus. @@ -184,7 +184,7 @@ public interface IMessage { * @return sequence number of this message * @see Message Sequencing and Timestamps */ - public long getSequenceNumber(); + long getSequenceNumber(); /** * Gets the session identifier for a session-aware entity. @@ -197,7 +197,7 @@ public interface IMessage { * @return session id of this message * @see Message Sessions */ - public String getSessionId(); + String getSessionId(); /** * Sets the session identifier for a session-aware entity. @@ -205,7 +205,7 @@ public interface IMessage { * @param sessionId session id of this message * @see #getSessionId() */ - public void setSessionId(String sessionId); + void setSessionId(String sessionId); /** * Gets the body of this message as a byte array. It is up to client applications @@ -216,7 +216,7 @@ public interface IMessage { * @deprecated Message body need not just a byte array. Replaced by {@link #getMessageBody()} */ @Deprecated - public byte[] getBody(); + byte[] getBody(); /** * Sets the body of this message as a byte array. @@ -226,7 +226,7 @@ public interface IMessage { * @deprecated Message body need not just a byte array. Replaced by {@link #setMessageBody(MessageBody)} */ @Deprecated - public void setBody(byte[] body); + void setBody(byte[] body); /** * Gets the body of this message. Client applications should extract message content based on body type. @@ -234,7 +234,7 @@ public interface IMessage { * @return body of this message * @see Messages, payloads, and serialization */ - public MessageBody getMessageBody(); + MessageBody getMessageBody(); /** * Sets the body of this message. @@ -242,7 +242,7 @@ public interface IMessage { * @param body body of this message * @see #getMessageBody() */ - public void setMessageBody(MessageBody body); + void setMessageBody(MessageBody body); /** * Gets the map of user application properties of this message. Client @@ -251,7 +251,7 @@ public interface IMessage { * @return the map of user application properties of this message * @see Messages, payloads, and serialization */ - public Map getProperties(); + Map getProperties(); /** * Sets the map of user application properties of this message. Client applications @@ -271,7 +271,7 @@ public interface IMessage { * @return correlation Id of this message * @see Message Routing and Correlation */ - public String getCorrelationId(); + String getCorrelationId(); /** * Sets a correlation identifier. @@ -279,14 +279,14 @@ public interface IMessage { * @param correlationId correlation Id of this message * @see #getCorrelationId() */ - public void setCorrelationId(String correlationId); + void setCorrelationId(String correlationId); /** * Gets the "to" address. * * @return To property value of this message */ - public String getTo(); + String getTo(); /** * Sets the "to" address. @@ -298,7 +298,7 @@ public interface IMessage { * * @param to To property value of this message */ - public void setTo(String to); + void setTo(String to); /** * Gets the address of an entity to send replies to. @@ -310,7 +310,7 @@ public interface IMessage { * @return ReplyTo property value of this message * @see Message Routing and Correlation */ - public String getReplyTo(); + String getReplyTo(); /** * Sets the address of an entity to send replies to. @@ -318,7 +318,7 @@ public interface IMessage { * @param replyTo ReplyTo property value of this message * @see #getReplyTo() */ - public void setReplyTo(String replyTo); + void setReplyTo(String replyTo); /** * Gets the application specific message label. @@ -328,7 +328,7 @@ public interface IMessage { * * @return Label property value of this message */ - public String getLabel(); + String getLabel(); /** * Sets an application specific message label. @@ -336,7 +336,7 @@ public interface IMessage { * @param label Label property value of this message * @see #getLabel() */ - public void setLabel(String label); + void setLabel(String label); /** * Gets or sets a session identifier augmenting the {@link #getReplyTo() ReplyTo} address. @@ -347,14 +347,14 @@ public interface IMessage { * @return ReplyToSessionId property value of this message * @see Message Routing and Correlation */ - public String getReplyToSessionId(); + String getReplyToSessionId(); /** * Gets or sets a session identifier augmenting the {@link #getReplyTo() ReplyTo} address. * * @param replyToSessionId ReplyToSessionId property value of this message */ - public void setReplyToSessionId(String replyToSessionId); + void setReplyToSessionId(String replyToSessionId); /** * Gets the partition key for sending a message to a partitioned entity. @@ -367,7 +367,7 @@ public interface IMessage { * @return partition key of this message * @see Partitioned entities */ - public String getPartitionKey(); + String getPartitionKey(); /** * Sets a partition key for sending a message to a partitioned entity @@ -375,7 +375,7 @@ public interface IMessage { * @param partitionKey partition key of this message * @see #getPartitionKey() */ - public void setPartitionKey(String partitionKey); + void setPartitionKey(String partitionKey); /** * Gets the partition key for sending a message to a entity via another partitioned transfer entity. @@ -387,7 +387,7 @@ public interface IMessage { * @return partition key on the via queue. * @see Transfers and Send Via */ - public String getViaPartitionKey(); + String getViaPartitionKey(); /** * Sets a via-partition key for sending a message to a destination entity via another partitioned entity @@ -395,7 +395,7 @@ public interface IMessage { * @param viaPartitionKey via-partition key of this message * @see #getViaPartitionKey() */ - public void setViaPartitionKey(String viaPartitionKey); + void setViaPartitionKey(String viaPartitionKey); /** * Gets the name of the queue or subscription that this message was enqueued on, before it was deadlettered. @@ -406,7 +406,7 @@ public interface IMessage { * @return dead letter source of this message * @see Dead-letter queues */ - public String getDeadLetterSource(); + String getDeadLetterSource(); /** * Gets the lock token for the current message. @@ -419,11 +419,11 @@ public interface IMessage { * @return lock token of this message. * @see Message transfers, locks, and settlement */ - public UUID getLockToken(); + UUID getLockToken(); /** * Creates a shallow copy of this message. * @return copy of this message */ - public IMessage createCopy(); + IMessage createCopy(); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageAndSessionPump.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageAndSessionPump.java index 1698511b35dd..30ea41f347c8 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageAndSessionPump.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageAndSessionPump.java @@ -7,8 +7,6 @@ import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; -import java.util.concurrent.ForkJoinPool; -import java.util.jar.JarException; import com.microsoft.azure.servicebus.primitives.ServiceBusException; @@ -27,7 +25,7 @@ interface IMessageAndSessionPump { * @deprecated Use {@link #registerMessageHandler(IMessageHandler, ExecutorService)} */ @Deprecated - public void registerMessageHandler(IMessageHandler handler) throws InterruptedException, ServiceBusException; + void registerMessageHandler(IMessageHandler handler) throws InterruptedException, ServiceBusException; /** * Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. @@ -38,7 +36,7 @@ interface IMessageAndSessionPump { * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if register failed */ - public void registerMessageHandler(IMessageHandler handler, ExecutorService executorService) throws InterruptedException, ServiceBusException; + void registerMessageHandler(IMessageHandler handler, ExecutorService executorService) throws InterruptedException, ServiceBusException; /** * Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. @@ -50,7 +48,7 @@ interface IMessageAndSessionPump { * @throws ServiceBusException if register failed */ @Deprecated - public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions) throws InterruptedException, ServiceBusException; + void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions) throws InterruptedException, ServiceBusException; /** * Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. @@ -62,7 +60,7 @@ interface IMessageAndSessionPump { * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if register failed */ - public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions, ExecutorService executorService) throws InterruptedException, ServiceBusException; + void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions, ExecutorService executorService) throws InterruptedException, ServiceBusException; /** * Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. @@ -73,7 +71,7 @@ interface IMessageAndSessionPump { * @throws ServiceBusException if register failed */ @Deprecated - public void registerSessionHandler(ISessionHandler handler) throws InterruptedException, ServiceBusException; + void registerSessionHandler(ISessionHandler handler) throws InterruptedException, ServiceBusException; /** * Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. @@ -84,7 +82,7 @@ interface IMessageAndSessionPump { * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if register failed */ - public void registerSessionHandler(ISessionHandler handler, ExecutorService executorService) throws InterruptedException, ServiceBusException; + void registerSessionHandler(ISessionHandler handler, ExecutorService executorService) throws InterruptedException, ServiceBusException; /** * Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. @@ -96,7 +94,7 @@ interface IMessageAndSessionPump { * @throws ServiceBusException if register failed */ @Deprecated - public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions) throws InterruptedException, ServiceBusException; + void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions) throws InterruptedException, ServiceBusException; /** * Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. @@ -108,7 +106,7 @@ interface IMessageAndSessionPump { * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if register failed */ - public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions, ExecutorService executorService) throws InterruptedException, ServiceBusException; + void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions, ExecutorService executorService) throws InterruptedException, ServiceBusException; /** * Abandon {@link Message} with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageEntityClient.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageEntityClient.java index 2d6ceb77bfef..7fbb1bc3b36e 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageEntityClient.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageEntityClient.java @@ -14,5 +14,5 @@ public interface IMessageEntityClient extends ICloseable { * * @return path of the entity this client is connecting to */ - public String getEntityPath(); + String getEntityPath(); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageHandler.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageHandler.java index 89e2df27e59f..577e70b4c2b6 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageHandler.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IMessageHandler.java @@ -16,7 +16,7 @@ public interface IMessageHandler { * @param message The received {@link Message}. * @return CompletableFuture for the message handler. */ - public CompletableFuture onMessageAsync(IMessage message); + CompletableFuture onMessageAsync(IMessage message); /** * Receiving the exceptions that passed by pump during message processing. @@ -24,5 +24,5 @@ public interface IMessageHandler { * @param exception Exception received in pump. * @param phase Exception phase. */ - public void notifyException(Throwable exception, ExceptionPhase phase); + void notifyException(Throwable exception, ExceptionPhase phase); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IQueueClient.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IQueueClient.java index 60679e29edea..820e991d4fe2 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IQueueClient.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/IQueueClient.java @@ -13,12 +13,12 @@ public interface IQueueClient extends IMessageSender, IMessageAndSessionPump, IM * * @return The receive mode. */ - public ReceiveMode getReceiveMode(); + ReceiveMode getReceiveMode(); /** * Gets the name of the queue. * * @return The name of the queue. */ - public String getQueueName(); + String getQueueName(); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISessionHandler.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISessionHandler.java index 8cb4966209f9..6961f05ee8c3 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISessionHandler.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISessionHandler.java @@ -17,7 +17,7 @@ public interface ISessionHandler { * @param message The received {@link Message}. * @return CompletableFuture for the message handler. */ - public CompletableFuture onMessageAsync(IMessageSession session, IMessage message); + CompletableFuture onMessageAsync(IMessageSession session, IMessage message); /** * Called just before a session is closed by the session pump @@ -25,7 +25,7 @@ public interface ISessionHandler { * @param session session being closed * @return a future that executes the action */ - public CompletableFuture OnCloseSessionAsync(IMessageSession session); + CompletableFuture OnCloseSessionAsync(IMessageSession session); /** * Receiving the exceptions that passed by pump during message processing. @@ -33,5 +33,5 @@ public interface ISessionHandler { * @param exception Exception received in pump. * @param phase Exception phase. */ - public void notifyException(Throwable exception, ExceptionPhase phase); + void notifyException(Throwable exception, ExceptionPhase phase); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISubscriptionClient.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISubscriptionClient.java index 7c72f9eeff0f..020ffee018e5 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISubscriptionClient.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ISubscriptionClient.java @@ -20,7 +20,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * * @return The receive mode. */ - public ReceiveMode getReceiveMode(); + ReceiveMode getReceiveMode(); /** * Adds a rule to the current subscription to filter the messages reaching from topic to the subscription. @@ -29,7 +29,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if add rule failed */ - public void addRule(RuleDescription ruleDescription) throws InterruptedException, ServiceBusException; + void addRule(RuleDescription ruleDescription) throws InterruptedException, ServiceBusException; /** * Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription. @@ -37,7 +37,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @param ruleDescription The rule description that provides the rule to add. * @return a CompletableFuture representing the pending rule add operation. */ - public CompletableFuture addRuleAsync(RuleDescription ruleDescription); + CompletableFuture addRuleAsync(RuleDescription ruleDescription); /** * Adds a rule with specified name and {@link Filter} to the current subscription to filter the messages reaching from topic to the subscription. @@ -47,7 +47,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if add rule failed */ - public void addRule(String ruleName, Filter filter) throws InterruptedException, ServiceBusException; + void addRule(String ruleName, Filter filter) throws InterruptedException, ServiceBusException; /** * Asynchronously adds a rule with specified name and {@link Filter} to the current subscription to filter the messages reaching from topic to the subscription. @@ -56,7 +56,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @param filter The {@link Filter} to add. * @return a CompletableFuture representing the pending rule add operation. */ - public CompletableFuture addRuleAsync(String ruleName, Filter filter); + CompletableFuture addRuleAsync(String ruleName, Filter filter); /** * Asynchronously removes the rule on the subscription identified by ruleName @@ -64,7 +64,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @param ruleName he name of rule. * @return a CompletableFuture representing the pending rule remove operation. */ - public CompletableFuture removeRuleAsync(String ruleName); + CompletableFuture removeRuleAsync(String ruleName); /** * Removes the rule on the subscription identified by ruleName @@ -73,7 +73,7 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if remove rule failed */ - public void removeRule(String ruleName) throws InterruptedException, ServiceBusException; + void removeRule(String ruleName) throws InterruptedException, ServiceBusException; /** * Get all rules associated with the subscription. @@ -82,25 +82,25 @@ public interface ISubscriptionClient extends IMessageEntityClient, IMessageAndSe * @throws InterruptedException if the current thread was interrupted while waiting * @throws ServiceBusException if get rules failed */ - public Collection getRules() throws ServiceBusException, InterruptedException; + Collection getRules() throws ServiceBusException, InterruptedException; /** * Get all rules associated with the subscription. * * @return a CompletableFuture representing the pending get rules operation. */ - public CompletableFuture> getRulesAsync(); + CompletableFuture> getRulesAsync(); /** * Gets the name of the topic, for this subscription. * * @return the name of the topic */ - public String getTopicName(); + String getTopicName(); /** * Gets the subscription name. * @return The subscription name. */ - public String getSubscriptionName(); + String getSubscriptionName(); } diff --git a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ITopicClient.java b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ITopicClient.java index 5910cf0ebaec..5b655022bcff 100644 --- a/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ITopicClient.java +++ b/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ITopicClient.java @@ -15,5 +15,5 @@ public interface ITopicClient extends IMessageSender, IMessageBrowser, IMessageE * Get the name of the topic * @return the name of the topic */ - public String getTopicName(); + String getTopicName(); }