Package io.helidon.microprofile.testing
Annotation Interface Socket
CDI qualifier to inject a JAX-RS client or URI for a named socket.
The supported types are:
This annotation can be used on constructor parameters, or class fields. Test method parameter injection may be supported depending on the test framework integration.
Also note that the default socket name is "@default"
.
E.g. constructor injection:
class MyTest { private final WebTarget target; @Inject MyTest(@Socket("@default") URI uri) { target = ClientBuilder.newClient().target(uri); } }
E.g. field injection:
class MyTest { @Inject // optional @Socket("@default") private WebTarget target; }
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueName of the socket.- Returns:
- socket name
-