Top Description Methods
org.eclipse.microprofile.rest.client.inject

public @Interface RegisterRestClient

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE
@Stereotype
@Dependent
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, jakarta.enterprise.context.Dependent, jakarta.enterprise.inject.Stereotype

A marker annotation to register a rest client at runtime. This marker must be applied to any CDI managed clients. Note that the annotated interface indicates a service-centric view. Thus users would invoke methods on this interface as if it were running in the same VM as the remote service.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the base URI for annotated client interface. An empty value indicates that the base URI must be specified in MicroprofileConfig.
baseUri
()

Sets the base URI for the rest client interface.

public String

Returns:

the configuration key in use by this client interface. An empty value means that this interface is not associated with a configuration key.
configKey
()

Associates the annotated rest client interface with this configuration key.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

baseUriback to summary
public String baseUri()

Sets the base URI for the rest client interface. This value will be used for the URI unless it is overridden by MicroProfile Config.

Returns:String

the base URI for annotated client interface. An empty value indicates that the base URI must be specified in MicroprofileConfig.

Since
1.2
configKeyback to summary
public String configKey()

Associates the annotated rest client interface with this configuration key. By specifying a non-empty value, this interface can be configured more simply using the configuration key rather than the fully-qualified class name of the interface.

Returns:String

the configuration key in use by this client interface. An empty value means that this interface is not associated with a configuration key.

Since
1.3