Skip to content

Commit

Permalink
add java doc (#26173)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliuTo authored Dec 24, 2021
1 parent 9f9ff68 commit 4528239
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class AzureBootstrapConfiguration {

/**
* Bean for the {@link AzureListenerAnnotationBeanPostProcessor}.
* @return the bean post processor bean.
*/
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@Bean
public AzureListenerAnnotationBeanPostProcessor azureListenerAnnotationProcessor() {
return new AzureListenerAnnotationBeanPostProcessor();
}

/**
* Bean for the {@link AzureListenerEndpointRegistry}.
* @return the listener endpoint registry bean.
*/
@Bean(name = AzureListenerAnnotationBeanPostProcessor.DEFAULT_AZURE_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME)
public AzureListenerEndpointRegistry azureListenerEndpointRegistry() {
return new AzureListenerEndpointRegistry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public class AzureListenerAnnotationBeanPostProcessor
@Nullable
private StringValueResolver embeddedValueResolver;

/**
* Set the container factory bean name.
* @param containerFactoryBeanName the container factory bean name.
*/
public void setContainerFactoryBeanName(String containerFactoryBeanName) {
this.containerFactoryBeanName = containerFactoryBeanName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public void afterPropertiesSet() {
registerAllEndpoints();
}

/**
* Register all {@link AzureListenerEndpoint}s under the registrar to create the associated containers.
*/
protected void registerAllEndpoints() {
Assert.state(this.endpointRegistry != null, "No AzureListenerEndpointRegistry set");
synchronized (this.mutex) {
Expand Down Expand Up @@ -120,26 +123,50 @@ public void registerEndpoint(AzureListenerEndpoint endpoint) {
registerEndpoint(endpoint, null);
}

/**
* Set the bean name of the container factory.
* @param containerFactoryBeanName the bean name of the container factory.
*/
public void setContainerFactoryBeanName(String containerFactoryBeanName) {
this.containerFactoryBeanName = containerFactoryBeanName;
}

/**
* Get the {@link AzureListenerEndpointRegistry}.
* @return the {@link AzureListenerEndpointRegistry}.
*/
public AzureListenerEndpointRegistry getEndpointRegistry() {
return this.endpointRegistry;
}

/**
* Set the {@link AzureListenerEndpointRegistry}.
* @param endpointRegistry the {@link AzureListenerEndpointRegistry}.
*/
public void setEndpointRegistry(AzureListenerEndpointRegistry endpointRegistry) {
this.endpointRegistry = endpointRegistry;
}

/**
* Get the {@link MessageHandlerMethodFactory}.
* @return the {@link MessageHandlerMethodFactory}.
*/
public MessageHandlerMethodFactory getMessageHandlerMethodFactory() {
return this.messageHandlerMethodFactory;
}

/**
* Set the {@link MessageHandlerMethodFactory}.
* @param messageHandlerMethodFactory the {@link MessageHandlerMethodFactory}.
*/
public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory) {
this.messageHandlerMethodFactory = messageHandlerMethodFactory;
}

/**
* Set the {@link ListenerContainerFactory}.
* @param containerFactory the {@link ListenerContainerFactory}.
*/
public void setContainerFactory(ListenerContainerFactory<?> containerFactory) {
this.containerFactory = containerFactory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
@Configuration
public class AzureMessagingConfiguration {

/**
* Bean for the {@link ListenerContainerFactory}.
* @param subscribeByGroupOperation the {@link SubscribeByGroupOperation}.
* @return the {@link ListenerContainerFactory} bean.
*/
@ConditionalOnMissingBean
@Bean(name = AzureListenerAnnotationBeanPostProcessor.DEFAULT_AZURE_LISTENER_CONTAINER_FACTORY_BEAN_NAME)
public ListenerContainerFactory<? extends MessageListenerContainer> azureListenerContainerFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
public class DefaultAzureListenerContainerFactory
extends AbstractAzureListenerContainerFactory<DefaultMessageListenerContainer> {

/**
* Construct the listener container factory with the {@link SubscribeByGroupOperation}.
* @param subscribeOperation the {@link SubscribeByGroupOperation}.
*/
public DefaultAzureListenerContainerFactory(SubscribeByGroupOperation subscribeOperation) {
super(subscribeOperation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,34 @@ public String toString() {
return getEndpointDescription().toString();
}

/**
* Get the destination.
* @return the destination.
*/
public String getDestination() {
return destination;
}

/**
* Set the destination.
* @param destination the destination.
*/
public void setDestination(String destination) {
this.destination = destination;
}

/**
* Get the group for the corresponding listener container.
* @return the group for the corresponding listener container.
*/
public String getGroup() {
return group;
}

/**
* Set the group for the corresponding listener container.
* @param group the group for the corresponding listener container.
*/
public void setGroup(String group) {
this.group = group;
}
Expand All @@ -84,14 +100,26 @@ public String getId() {
return id;
}

/**
* Set the id of this endpoint.
* @param id the id of this endpoint.
*/
public void setId(String id) {
this.id = id;
}

/**
* Set the concurrency expression.
* @param concurrency the concurrency expression.
*/
public void setConcurrency(String concurrency) {
this.concurrency = concurrency;
}

/**
* Get the concurrency expression.
* @return the concurrency expression.
*/
public String getConcurrency() {
return concurrency;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,44 @@ protected StringBuilder getEndpointDescription() {
.append(this.method).append("'");
}

/**
* Get the object instance that should manage this endpoint.
* @return the target bean instance.
*/
public Object getBean() {
return bean;
}

/**
* Set the object instance that should manage this endpoint.
* @param bean the target bean instance.
*/
public void setBean(Object bean) {
this.bean = bean;
}

/**
* Get the method to invoke to process a message managed by this endpoint.
* @return the method to invoke to process a message managed by this endpoint.
*/
public Method getMethod() {
return method;
}

/**
* Set the method to invoke to process a message managed by this endpoint.
* @param method the target method for the {@link #bean}.
*/
public void setMethod(Method method) {
this.method = method;
}

/**
* Set the {@link MessageHandlerMethodFactory} to use to build the
* {@link InvocableHandlerMethod} responsible to manage the invocation
* of this endpoint.
* @param messageHandlerMethodFactory the {@link MessageHandlerMethodFactory} instance.
*/
public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory) {
this.messageHandlerMethodFactory = messageHandlerMethodFactory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ protected AzureMessageHandler createMessageHandler(MessageListenerContainer cont
return this.azureMessageHandler;
}

/**
* Get the message handler.
* @return the message handler.
*/
public AzureMessageHandler getAzureMessageHandler() {
return azureMessageHandler;
}

/**
* Set the message handler.
* @param azureMessageHandler the message handler.
*/
public void setAzureMessageHandler(AzureMessageHandler azureMessageHandler) {
this.azureMessageHandler = azureMessageHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ private Class<?> resolveMessagePayloadType(InvocableHandlerMethod method) {
return parameterTypes[0];
}

/**
* Get the handler method.
* @return the handler method.
*/
public InvocableHandlerMethod getHandlerMethod() {
return handlerMethod;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public abstract class AzurePartitionBinderTests<B extends AbstractTestBinder<
CP extends ConsumerProperties, PP extends ProducerProperties>
extends PartitionCapableBinderTests<B, CP, PP> {

/**
* Execute necessary operations to enable tests.
*/
@BeforeAll
public static void enableTests() {
}
Expand Down

0 comments on commit 4528239

Please sign in to comment.