@Qualifier @Retention(RUNTIME) @Target({FIELD,PARAMETER}) @Deprecated(since="4.2.0") public @interface Socket
Deprecated.
Use Socket instead
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
    Modifier and Type
    Required Element
    Description
    Deprecated.
    Name of the socket.
  • Element Details

    • value

      String value
      Deprecated.
      Name of the socket.
      Returns:
      socket name