Annotation Interface Socket
@Qualifier
@Retention(RUNTIME)
@Target({FIELD,PARAMETER})
@Deprecated(since="4.2.0")
public @interface Socket
Deprecated.
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 valueDeprecated.Name of the socket.- Returns:
- socket name
-
Socket
instead