Skip to content

Commit 8b71f1a

Browse files
committed
docs: add comprehensive English Javadoc
1 parent c45a573 commit 8b71f1a

38 files changed

Lines changed: 1141 additions & 0 deletions

File tree

src/main/java/org/apache/rocketmq/spring/boot/RocketmqPullConsumerAutoConfiguration.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public class RocketmqPullConsumerAutoConfiguration implements ApplicationContex
7676
*/
7777
@Bean
7878
@ConditionalOnMissingBean
79+
/**
80+
* <p>Allocate message queue strategy.</p>
81+
* @return the allocate message queue strategy
82+
*/
7983
public AllocateMessageQueueStrategy allocateMessageQueueStrategy() {
8084
return new AllocateMessageQueueConsistentHash();
8185
}
@@ -161,6 +165,9 @@ public DefaultMQPullConsumer pullConsumer(RocketmqPullConsumerProperties propert
161165
* not yet registered.
162166
*/
163167
Executors.newScheduledThreadPool(1).schedule(new Thread() {
168+
/**
169+
* <p>Run.</p>
170+
*/
164171
public void run() {
165172
try {
166173

@@ -191,6 +198,11 @@ public void run() {
191198

192199
@Bean
193200
@ConditionalOnProperty(prefix = RocketmqPullConsumerProperties.PREFIX, name = "schedulable", havingValue = "true")
201+
/**
202+
* <p>Schedule pull consumer.</p>
203+
* @param properties
204+
* @return the schedule pull consumer
205+
*/
194206
public MQPullConsumerScheduleService schedulePullConsumer(RocketmqPullConsumerProperties properties) throws MQClientException {
195207

196208
if (StringUtils.isEmpty(properties.getConsumerGroup())) {
@@ -238,6 +250,9 @@ public MQPullConsumerScheduleService schedulePullConsumer(RocketmqPullConsumerPr
238250
* not yet registered.
239251
*/
240252
Executors.newScheduledThreadPool(1).schedule(new Thread() {
253+
/**
254+
* <p>Run.</p>
255+
*/
241256
public void run() {
242257
try {
243258

@@ -267,15 +282,28 @@ public void run() {
267282
}
268283

269284
@Bean
285+
/**
286+
* <p>Rocketmq consumer template.</p>
287+
* @param consumer
288+
* @return the rocketmq consumer template
289+
*/
270290
public RocketmqPullConsumerTemplate rocketmqConsumerTemplate(MQPullConsumer consumer) throws MQClientException {
271291
return new RocketmqPullConsumerTemplate(consumer);
272292
}
273293

274294
@Override
295+
/**
296+
* <p>Sets the application context.</p>
297+
* @param applicationContext
298+
*/
275299
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
276300
this.applicationContext = applicationContext;
277301
}
278302

303+
/**
304+
* <p>Returns the application context.</p>
305+
* @return the get application context
306+
*/
279307
public ApplicationContext getApplicationContext() {
280308
return applicationContext;
281309
}

src/main/java/org/apache/rocketmq/spring/boot/RocketmqPushConsumerAutoConfiguration.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,20 @@ public class RocketmqPushConsumerAutoConfiguration {
7373

7474
@Bean
7575
@ConditionalOnMissingBean
76+
/**
77+
* <p>Message listener concurrently.</p>
78+
* @return the message listener concurrently
79+
*/
7680
public MessageListenerConcurrently messageListenerConcurrently() {
7781
return new DefaultMessageListenerConcurrently();
7882
}
7983

8084
@Bean
8185
@ConditionalOnMissingBean
86+
/**
87+
* <p>Message listener orderly.</p>
88+
* @return the message listener orderly
89+
*/
8290
public MessageListenerOrderly messageListenerOrderly() {
8391
return new DefaultMessageListenerOrderly();
8492
}
@@ -89,6 +97,10 @@ public MessageListenerOrderly messageListenerOrderly() {
8997
*/
9098
@Bean
9199
@ConditionalOnMissingBean
100+
/**
101+
* <p>Allocate message queue strategy.</p>
102+
* @return the allocate message queue strategy
103+
*/
92104
public AllocateMessageQueueStrategy allocateMessageQueueStrategy() {
93105
return new AllocateMessageQueueConsistentHash();
94106
}
@@ -139,6 +151,10 @@ public void configure(DefaultMQPushConsumer consumer, RocketmqPushConsumerProper
139151

140152
@Bean
141153
@ConditionalOnMissingBean
154+
/**
155+
* <p>Default sub provider.</p>
156+
* @return the default sub provider
157+
*/
142158
public SubscriptionProvider defaultSubProvider() {
143159
return new DefaultSubscriptionProvider();
144160
}
@@ -246,6 +262,9 @@ public DefaultMQPushConsumer pushConsumer(RocketmqPushConsumerProperties propert
246262
* its listener is not yet registered.
247263
*/
248264
Executors.newScheduledThreadPool(1).schedule(new Thread() {
265+
/**
266+
* <p>Run.</p>
267+
*/
249268
public void run() {
250269
try {
251270

@@ -280,6 +299,11 @@ public void run() {
280299
}
281300

282301
@Bean
302+
/**
303+
* <p>Rocketmq consumer template.</p>
304+
* @param consumer
305+
* @return the rocketmq consumer template
306+
*/
283307
public RocketmqPushConsumerTemplate rocketmqConsumerTemplate(MQPushConsumer consumer) throws MQClientException {
284308
return new RocketmqPushConsumerTemplate(consumer);
285309
}

0 commit comments

Comments
 (0)