Annotation Interface Push


The CDI annotation @Push allows you to inject a PushContext associated with a given channel in any container managed artifact in WAR (not in EAR/EJB!).

 @Inject @Push
 private PushContext channelName;
 

For detailed usage instructions, see Socket, Sse and Notification javadocs.

Since:
2.3
Author:
Bauke Scholtz
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Represents the transport type for push messages.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    (Optional) The name of the push channel.
    (Optional) The transport type to use.
  • Element Details

    • channel

      String channel
      (Optional) The name of the push channel. If not specified the name of the injection target field will be used.
      Returns:
      The name of the push channel.
      Default:
      ""
    • type

      Push.Type type
      (Optional) The transport type to use. Defaults to Push.Type.SOCKET.
      Returns:
      The transport type to use.
      Since:
      5.2
      Default:
      SOCKET