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 ClassesModifier and TypeClassDescriptionstatic enumRepresents the transport type for push messages. -
Optional Element Summary
Optional Elements
-
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 toPush.Type.SOCKET.- Returns:
- The transport type to use.
- Since:
- 5.2
- Default:
SOCKET
-