Skip to content

Commit 569f507

Browse files
committed
Clarify role of factory in javadocs
See #323
1 parent ce98bcb commit 569f507

1 file changed

Lines changed: 24 additions & 7 deletions

File tree

spring-grpc-core/src/main/java/org/springframework/grpc/client/ImportGrpcClients.java

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,43 +38,60 @@
3838
public @interface ImportGrpcClients {
3939

4040
/**
41-
* The name or base URL of the gRPC server to connect to. If not specified, the client
41+
* The name or base URL of the gRPC server to connect to. If not specified, the
42+
* client
4243
* will connect to the default server.
44+
*
4345
* @return the name or base URL of the server
4446
*/
4547
String target() default "default";
4648

4749
/**
48-
* The prefix to use when creating bean definitions for clients, completed by the
49-
* simple name of the class. Default is empty. You only need to specify a value if you
50-
* define more than one client of the same type (or with types that have the same name
50+
* The prefix to use when creating bean definitions for clients, completed by
51+
* the
52+
* simple name of the class. Default is empty. You only need to specify a value
53+
* if you
54+
* define more than one client of the same type (or with types that have the
55+
* same name
5156
* in different packages).
57+
*
5258
* @return the prefix
5359
*/
5460
String prefix() default "";
5561

5662
/**
5763
* Concrete types of the stubs to create.
64+
*
5865
* @return the types of the stubs
5966
*/
6067
Class<?>[] types() default {};
6168

6269
/**
63-
* The factory type to use to create the stubs. Only needed if you are scanning (with
64-
* basePackageClasses or basePackages) and you need to customize the stub creation.
70+
* The factory type to use to create the stubs. Only needed if you are scanning
71+
* (with
72+
* basePackageClasses or basePackages) and you need to customize the stub
73+
* creation.
74+
*
6575
* @return the factory type, default is {@link BlockingStubFactory}
6676
*/
6777
Class<? extends StubFactory<?>> factory() default UnspecifiedStubFactory.class;
6878

6979
/**
7080
* The base package classes to scan for stub implementations. If not specified,
7181
* scanning will be done from the package of the class with this annotation.
82+
* When a stub is found, a client bean will be created for it using the
83+
* configured
84+
* {@link #factory()}.
85+
*
7286
* @return the base package classes for scanning
7387
*/
7488
Class<?>[] basePackageClasses() default {};
7589

7690
/**
77-
* The base packages to scan for stub implementations.
91+
* The base packages to scan for stub implementations. When a stub is found, a
92+
* client bean will be created for it using the configured
93+
* {@link #factory()}.
94+
*
7895
* @return the base packages for scanning
7996
*/
8097
String[] basePackages() default {};

0 commit comments

Comments
 (0)