Skip to content

Commit 306cf71

Browse files
authored
Adds additional javadocs and removes broken link. (Azure#37060)
* Remove broken link. * Update javadocs for ctor. * Add ctor javadocs * Add @deprecated javadoc
1 parent d69859a commit 306cf71

File tree

15 files changed

+100
-5
lines changed

15 files changed

+100
-5
lines changed

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/Messages.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public enum Messages {
9191
static final String ENCODING_TYPE_NOT_SUPPORTED_ENCODER = getMessage("ENCODING_TYPE_NOT_SUPPORTED_ENCODER");
9292

9393
/**
94+
* Gets the message given its corresponding key.
95+
*
9496
* @param key the key of the message to retrieve
9597
* @return the message matching the given key
9698
*/

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/Checkpoint.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ public class Checkpoint {
2424
private Long offset;
2525
private Long sequenceNumber;
2626

27+
/**
28+
* Creates a new instance.
29+
*/
30+
public Checkpoint() {
31+
}
32+
2733
/**
2834
* Returns the fully qualified namespace of the Event Hub.
2935
*

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/CreateBatchOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public class CreateBatchOptions {
2020
private String partitionKey;
2121
private String partitionId;
2222

23+
/**
24+
* Creates a new instance.
25+
*/
26+
public CreateBatchOptions() {
27+
}
28+
2329
/**
2430
* Sets the maximum size for the {@link EventDataBatch batch of events}, in bytes.
2531
*

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/PartitionOwnership.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public class PartitionOwnership {
2020
private Long lastModifiedTime;
2121
private String eTag;
2222

23+
/**
24+
* Creates a new instance.
25+
*/
26+
public PartitionOwnership() {
27+
}
28+
2329
/**
2430
* Returns the fully qualified namespace of the Event Hub.
2531
*

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/ReceiveOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ public class ReceiveOptions {
1818
private Long ownerLevel;
1919
private boolean trackLastEnqueuedEventProperties;
2020

21+
/**
22+
* Creates a new instance.
23+
*/
24+
public ReceiveOptions() {
25+
}
26+
2127
/**
2228
* Gets the owner level for this consumer. If the value is {@code null}, then this is not an exclusive consumer.
2329
* Otherwise, it is an exclusive consumer, and there can only be one active consumer for each partition and consumer

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/SendOptions.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@
99
/**
1010
* The set of options that can be specified when sending a set of events to influence the way in which events are sent
1111
* to the Event Hubs service.
12+
*
13+
* @see com.azure.messaging.eventhubs.EventHubProducerClient#send(Iterable, SendOptions)
14+
* @see com.azure.messaging.eventhubs.EventHubProducerAsyncClient#send(Iterable, SendOptions)
1215
*/
1316
@Fluent
1417
public class SendOptions {
1518
private String partitionKey;
1619
private String partitionId;
1720

21+
/**
22+
* Creates a new instance.
23+
*/
24+
public SendOptions() {
25+
}
26+
1827
/**
1928
* Sets a hashing key to be provided for the batch of events, which instructs the Event Hubs service to map this key
2029
* to a specific partition.

sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusErrorSource.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,15 @@ public final class ServiceBusErrorSource extends ExpandableStringEnum<ServiceBus
4444
/** Error while trying to do an operation on the management link. */
4545
public static final ServiceBusErrorSource MANAGEMENT = fromString("MANAGEMENT",
4646
ServiceBusErrorSource.class);
47+
48+
/**
49+
* Creates a new instance of the error source. Use the existing error sources and create a new error source using
50+
* {@link ServiceBusErrorSource#fromString(String, Class)}.
51+
*
52+
* @deprecated Use {@link ServiceBusErrorSource#fromString(String, Class)} instead.
53+
*/
54+
@Deprecated
55+
public ServiceBusErrorSource() {
56+
super();
57+
}
4758
}

sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusFailureReason.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.azure.core.util.ExpandableStringEnum;
77

88
/**
9-
* The set of well-known reasons for an Service Bus operation failure that was the cause of an exception.
9+
* The set of well-known reasons for a Service Bus operation failure that was the cause of an exception.
1010
*/
1111
public final class ServiceBusFailureReason extends ExpandableStringEnum<ServiceBusFailureReason> {
1212
// NOTE: this list is intended to mirror the reasons we have in .net
@@ -70,4 +70,16 @@ public final class ServiceBusFailureReason extends ExpandableStringEnum<ServiceB
7070
/** The user doesn't have access to the entity. */
7171
public static final ServiceBusFailureReason UNAUTHORIZED = fromString("UNAUTHORIZED",
7272
ServiceBusFailureReason.class);
73+
74+
75+
/**
76+
* Creates a new instance of the failure reason. Use the existing failure reasons and create a new failure reason
77+
* using {@link ServiceBusFailureReason#fromString(String, Class)}.
78+
*
79+
* @deprecated Use {@link ServiceBusErrorSource#fromString(String, Class)} instead.
80+
*/
81+
@Deprecated
82+
public ServiceBusFailureReason() {
83+
super();
84+
}
7385
}

sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/administration/models/EmptyRuleAction.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
public class EmptyRuleAction extends RuleAction {
1313
private static final EmptyRuleAction INSTANCE = new EmptyRuleAction();
1414

15+
/**
16+
* Creates a new instance of a rule action that does nothing.
17+
*/
18+
public EmptyRuleAction() {
19+
}
20+
21+
/**
22+
* Gets an instance of the empty rule action.
23+
*
24+
* @return An instance of the empty rule action.
25+
*/
1526
static EmptyRuleAction getInstance() {
1627
return INSTANCE;
1728
}

sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/models/AbandonOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
public final class AbandonOptions extends SettlementOptions {
2525
private Map<String, Object> propertiesToModify;
2626

27+
/**
28+
* Creates a new instance of options to specify when abandoning messages.
29+
*/
30+
public AbandonOptions() {
31+
}
32+
2733
/**
2834
* Gets the message properties to modify while abandoning the message.
2935
*

0 commit comments

Comments
 (0)