19
19
import java .util .Set ;
20
20
21
21
/**
22
- * A registry that contains HTTP Service client proxies .
22
+ * A registry for HTTP service clients organized by {@link HttpServiceGroup} .
23
23
*
24
24
* @author Rossen Stoyanchev
25
25
* @author Olga Maciaszek-Sharma
30
30
public interface HttpServiceProxyRegistry {
31
31
32
32
/**
33
- * Return an HTTP service client proxy from any group as long as there is
34
- * only one client proxy of the given type across all groups.
35
- * @param httpServiceType the type of client proxy
36
- * @return the proxy, or {@code null} if not found
37
- * @param <P> the type of HTTP Interface client proxy
38
- * @throws IllegalArgumentException if there is no client proxy of the given
39
- * type, or there is more than one client proxy of the given type
33
+ * Return an HTTP service client from any group as long as there is only one
34
+ * client of this type across all groups.
35
+ * @param httpServiceType the type of client
36
+ * @param <P> the type of HTTP interface client
37
+ * @return the matched client
38
+ * @throws IllegalArgumentException if there is no client of the given type,
39
+ * or there is more than one client of the given type.
40
40
*/
41
41
<P > P getClient (Class <P > httpServiceType );
42
42
43
43
/**
44
- * Return an HTTP service client proxy from the given group.
44
+ * Return an HTTP service client from the named group.
45
45
* @param groupName the name of the group
46
- * @param httpServiceType the type of client proxy
47
- * @return the proxy, or {@code null} if not found
48
- * @throws IllegalArgumentException if there is no group with the given
49
- * name, or no client proxy of the given type in the group
50
- * @param <P> the type of HTTP Interface client proxy
46
+ * @param httpServiceType the type of client
47
+ * @param <P> the type of HTTP interface client
48
+ * @return the matched client
49
+ * @throws IllegalArgumentException if there is no matching client.
51
50
*/
52
51
<P > P getClient (String groupName , Class <P > httpServiceType );
53
52
@@ -57,10 +56,10 @@ public interface HttpServiceProxyRegistry {
57
56
Set <String > getGroupNames ();
58
57
59
58
/**
60
- * Return the HTTP service types for all client proxies in the given group.
59
+ * Return all HTTP service client types in the named group.
61
60
* @param groupName the name of the group
62
61
* @return the HTTP service types
63
- * @throws IllegalArgumentException if there is no group with the given name
62
+ * @throws IllegalArgumentException if there is no matching group.
64
63
*/
65
64
Set <Class <?>> getClientTypesInGroup (String groupName );
66
65
0 commit comments